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

Slashes (/) are turned into backslashes (\) when you use the "set location" option #238

Open
babylonx opened this issue Aug 8, 2023 · 1 comment

Comments

@babylonx
Copy link

babylonx commented Aug 8, 2023

If you use the set location menu to move a torrent to a different directory, slashes in the path are turned into backslashes. This of course affects windows filesystems which use slashes instead of backslashes. Files are correctly moved in the filesystem but other remote transmission clients split the torrents into 2 different directories the original one with the slashes and the new category with the backslashes in the path.

So if I do this in tremotesf
Screenshot_20230808-231018

This is what happens in transgui
Screenshot_20230808-231346

@equeim
Copy link
Owner

equeim commented Sep 14, 2023

This is an issue with Transmission not correctly normalizing path separators on Windows. According to Transmission dev (transmission/transmission#3915 (comment)), clients should always use Unix separators ('/') in RPC requests, event when Transmission is running on Windows.

Unfortunately Transmission itself does not attempt to do this on its own end when sending RPC responses or accepting RPC requests from clients. This results in different torrents using different path separators, and in some cases even having both types in the same path (for example, for some torrent Transmission may return its download directory as "C:\User\Downloads\wtf/lol"). Tremotesf tries to handle this by converting all Windows paths returned by Transmission to '/' separators for consistent internal handling (so that they are displayed as single item in lists for example) and only using '' when displaying paths in UI. Additionally when sending requests to Transmission, '/' is used as per Transmission dev's recommendation.

If other clients don't treat paths with '/' and '' separators as same paths then I believe this is incorrect behaviour on their end.

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

No branches or pull requests

2 participants