Dear Users! Please post bug reports about FDM here!

Problem with 260-character limit on file name under Windows

Moderators: Usher, Alex

Hong

Problem with 260-character limit on file name under Windows

Postby Hong » Thu Dec 31, 2020 2:40 pm

Hello,
I found this issue on a magnet link and wish there is a workaround.

Phenomenon:

1. FDM (6.13.0.3463 on Win 7 x64 sp1) keeps aborting the whole download process and showing red "The system cannot find the file specified" in "Status" column.

2. Its log shows:
[2020-12-31T12:06:20.850][t:8152] [BtDownload 156]: torrent add finished [1]
[2020-12-31T12:06:20.850][t:8152] [BtDownload 156]: continueToStart: resuming torrent
[2020-12-31T12:06:21.454][t:8152] [BtDownload 156]: torrent files checked
[2020-12-31T12:06:48.175][t:8152] [BtDownload 156]: got error: The system cannot find the file specified
[2020-12-31T12:06:48.175][t:8152] [BtDownload 156]: {ERROR: |CODE|: 2, |CATEGORY|: libtorrent::system, |SOURCE|: C:\develop\workspace\fdm_qml_build_windows\src\vmscl\inet\qt\download\downloadsbt\lt\qtlttorrent.cpp,197, |DESCRIPTION|: The system cannot find the file specified}
[2020-12-31T12:06:48.175][t:8152] [BtDownload 156]: stopping...
[2020-12-31T12:06:48.175][t:8152] [BtDownload 156]: continueToStop
[2020-12-31T12:06:48.175][t:8152] [BtDownload 156]: continueToStop: pausing torrent

3. Using procmon [1] and comparing the timestamp with FDM log, I can confirm that the error happens when FDM tries to call CreateFile API (maybe indirectly) on the non-existing {download_final_output_file} while {download_final_output_file}.fdmdownload is completed (checked through file size and FDM UI "Files" -> "Progress" -> "100%").

4. All files "stuck" at 100% have a full path filename longer than 260 character [2]. All completed files (without suffix ".fdmdownload") have full path filename below 260 threshold.

Possible solutions?

a) The API used to create those ".fdmdownload" files is able to bypass this 260-char restriction somehow. Is it possible to use it as well in this final "rename" step?
b) Does it worth to support renaming the directory tree inside a torrent bundle, before or during the downloading stage?
c) How about ignoring the error and letting other regular files finish? The user can manually rename those 100% ".fdmdownload" afterwards.
d) I haven't found where the download progress is stored. Can I manually change it and the corresponding file names to a much shorter path before restarting the download?

[1] https://docs.microsoft.com/en-us/sysint ... ds/procmon
[2] https://docs.microsoft.com/en-us/window ... limitation
Alex
FDM Team
Posts: 2784
Joined: Mon Jul 12, 2004 12:17 pm

Re: Problem with 260-character limit on file name under Windows

Postby Alex » Fri Jan 08, 2021 11:15 am

Hello,
Thank you for the report!
This is a bug of Libtorrent library we use to download torrents.
I've submitted a bug report to the author and waiting for the response.
Alex,
FDM development team

Return to “General forum”

Who is online

Users browsing this forum: No registered users and 1 guest