Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission cannot find files (or dirs) with spaces at the beginning of a name #1272

Closed
amatus- opened this issue May 26, 2020 · 5 comments
Closed

Comments

@amatus-
Copy link

amatus- commented May 26, 2020

Regression after updating from 2.94 to 3.0. If the files of the torrent file contain spaces at the beginning of the name, then the transmission cannot find these files. In the properties of the torrent file, I see paths without spaces.

Ubuntu 18.04. Transmission 3.00 (bb6b5a0)

@mikedld
Copy link
Member

mikedld commented May 26, 2020

Have you removed the torrent from the client and then re-added it? That would certainly explain it, and I wouldn't call it a regression then but a new path components sanitizing behavior introduced in response to issues like #61 and #294.

@amatus-
Copy link
Author

amatus- commented May 26, 2020

After upgrading from 2.94 to 3.0 some torrents tell me "files not found". I tried to remove the torrent and add it again, but the client still does not find the files and tries to download the whole torrent again.

@amatus-
Copy link
Author

amatus- commented May 26, 2020

After re-adding and downloading, the transmission saved all new files without spaces. But all old torrents are lost.

@mikedld
Copy link
Member

mikedld commented May 26, 2020

I don't think they're lost as you're saying. Transmission doesn't remove the files unless you tell it to, so they may still be on your disk. I'm not sure what led to the initial issue, but removing and re-adding the torrent (or adding a new one) is going to change the names if they aren't correct enough, and having leading or trailing spaces in the name, along with a number of other cases, is certainly not correct, at least for some file systems or operating systems we support. It's unfortunate and I'm sorry that you will probably have to go and manually rename the files before Transmission will be able to find them again.

We'll take a look at why it may have happened right after the update.

@ckerr
Copy link
Member

ckerr commented Feb 23, 2022

The issue is that 99033b0 sanitizes nonportable filenames into a portable form, including removing leading spaces. So if a torrent was downloaded in a version of Transmission before this feature was added, the torrent contents will be on disk in a folder with a leading space in the name, but the new Transmission version will be looking for a folder without the leading space.

Unfortunately we can't just revert the change. Transmission 3.00 has been in the wild for two years now, so anyone who downloaded torrents with odd filenames during that time would get the same "disappearing file" problem when they upgrade. For that reason, I'm going to mark this as 'declined' because changing the current behavior would create more problems than it solves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants