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

"Please select a directory", does not show network drives #8386

Open
teddyrogers opened this issue Jan 12, 2025 · 10 comments
Open

"Please select a directory", does not show network drives #8386

teddyrogers opened this issue Jan 12, 2025 · 10 comments

Comments

@teddyrogers
Copy link

teddyrogers commented Jan 12, 2025

Tribler 8.0.7, when being asked for a directory Tribler is able to list volume drives, when at the root folder.

image

Tribler does not show/ or list the network drives. It is possible to manually enter in the network path. Tribler accepts the path and is able to use the network location as a destination folder.

Please provide visibility of the network paths at file request prompts or, preferably, use the operating system open and save file requester dialog. When, "Import torrent from file(s)", Tribler opens the operating system dialog, why not use it for all directory and file requests?

@qstokkink
Copy link
Contributor

That seems like a nice enhancement. To answer your question:

When, "Import torrent from file(s)", Tribler opens the operating system dialog, why not use it for all directory and file requests?

The idea here is that the Tribler process might be running on a remote host, or inside of a Docker filesystem, etc. In those cases, there is no Operating System dialog to open.

@teddyrogers
Copy link
Author

The idea here is that the Tribler process might be running on a remote host, or inside of a Docker filesystem, etc. In those cases, there is no Operating System dialog to open.

Is it possible for Tribler to detect instances when it is not running on a remote host and utilise the system dialog?

@qstokkink
Copy link
Contributor

To that, my answer is: yes and no. Yes, it would technically be possible to detect and do. My "no" is that this would make Tribler's code slightly schizophrenic: we'd be doing the same thing in two different ways. I think we should consider that when our number of issues is a bit closer to 0.

@teddyrogers
Copy link
Author

I think we should consider that when our number of issues is a bit closer to 0.

All good, was querying if it were possible. If it requires a lot of work and there is a functional and working method Tribler implements selecting network drives it makes little sense spending time on the feature for little gain.

@qstokkink
Copy link
Contributor

If I piece together https://stackoverflow.com/q/50528180

from os import listdir
from os.path import join
from win32com.shell import shell, shellcon

NETWORK_SHORTCUTS_FOLDER_PATH = shell.SHGetFolderPath(0, shellcon.CSIDL_NETHOOD, None, 0)
network_shortcuts = [join(NETWORK_SHORTCUTS_FOLDER_PATH, f) + "\\target.lnk" for f in listdir(NETWORK_SHORTCUTS_FOLDER_PATH)]

should give us the network folders. Currently, I have no way to test if this actually works, though.

@teddyrogers
Copy link
Author

Currently, I have no way to test if this actually works, though.

If you can compile a build I can test it here if it helps?

@qstokkink
Copy link
Contributor

qstokkink commented Jan 27, 2025

@teddyrogers If you want to help with testing, I created a custom win64 build: https://github.com/qstokkink/tribler/actions/runs/12990311432 (direct artifact link: https://github.com/qstokkink/tribler/actions/runs/12990311432/artifacts/2490742067)

Could you check if your network location appears along with the disk drives?

EDIT: In the spirit of open source, I should also show you what you are testing. This is the change: main...qstokkink:tribler:test_network_paths

@teddyrogers
Copy link
Author

teddyrogers commented Jan 28, 2025

@qstokkink it does not seem to be working. I can go back a folder all the way to "C:" and it stops as there is no way to go ".." to go back/ up.

The file in the link you provided is of Tribler 8.0.2, is this correct?

Image

@qstokkink
Copy link
Contributor

Thanks for checking, then the StackOverflow answer is not applicable here. We'll have to look for another way.

(Trivia: The 8.0.2 version is because I built from my personal GitHub fork, which does not have up-to-date git tags)

@im-vmn
Copy link

im-vmn commented Feb 3, 2025

I don't know about MS Windows, but on GNU Linux it's not a problem, I mount directories from remote hosts with sshfs and it works fine with no modifications in Tribler. Maybe there are similar instruments for MS Windows?

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