TC Unable to open files on rclone mount

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

hawkie
Junior Member
Junior Member
Posts: 5
Joined: 2023-01-26, 07:41 UTC

TC Unable to open files on rclone mount

Post by *hawkie »

This might not be a specific 10.x bug as it never really worked.

So I have a Google Drive mounted through "rclone mount" command under the c:\gdrive path

If I go to Windows Explorer to this path and double click a file (ex: MKV file) it opens just fine under the associated program.
On the other hand if I go in Total Commander to same path and double click the file I get the attached error

Image: https://i.imgur.com/HC1JM3Z.png

On the other hand if I right click the file and choose open with, it opens fine.

So question is why in Windows Explorer it works smoothly, while Total Commander cannot find the path ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC Unable to open files on rclone mount

Post by *ghisler(Author) »

Total Commander calls ShellExecuteEx by default. Maybe rclone doesn't handle that correctly.

Does it work when you right click on the file for half a second to open the context menu, then click on the file name in the menu?
If yes, you can use that method also when double clicking or pressing ENTER:

wincmd.ini under header [Configuration] add a new line containing:
ExecUseContextMenu=1

You can edit the wincmd.ini via Configuration - Change settings files directly.
Author of Total Commander
https://www.ghisler.com
hawkie
Junior Member
Junior Member
Posts: 5
Joined: 2023-01-26, 07:41 UTC

Re: TC Unable to open files on rclone mount

Post by *hawkie »

So I've tried what you said.
It does work / file opens if I right click then select the file name on the context menu.

However, if I put ExecUseContextMenu=1 in wincmd.ini then if I press ENTER or simply double click the file located in the same path nothing at all will happen. No error thrown but nothing happens.
User avatar
Stefan2
Power Member
Power Member
Posts: 4124
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: TC Unable to open files on rclone mount

Post by *Stefan2 »

hawkie wrote: 2023-01-27, 10:36 UTC So I've tried what you said.
It does work / file opens if I right click then select the file name on the context menu.

However, if I put ExecUseContextMenu=1 in wincmd.ini then if I press ENTER or simply double click the file located in the same path nothing at all will happen. No error thrown but nothing happens.

Just to be sure:

Have you put the "ExecUseContextMenu" in the [Configuration]- section?
wincmd.ini
[Configuration]
ExecUseContextMenu=1


And you have checked that you have "ExecUseContextMenu" only once in the wincmd.ini?

And have you modified the real used wincmd.ini?
(see menu "Help > About TC" or open the INI explicit via menu "Configuration - Change settings files directly.")

Have you restart the TC after modifying the INI? (not saying that is need, may be not, just to know)




 
hawkie
Junior Member
Junior Member
Posts: 5
Joined: 2023-01-26, 07:41 UTC

Re: TC Unable to open files on rclone mount

Post by *hawkie »

I did all that yes. Proof is that the behavior changed. It no longer throws the previous error it's just that nothing happens.
This is easily reproduceable if you have a google account. I'm using latest rclone and Total Commander version.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC Unable to open files on rclone mount

Post by *ghisler(Author) »

I have a Google account but I have never heard of rclone. Before I spend hours trying to set it up in a way to reproduce the bug, can you post some instructions? I can test on any Windows version.
Author of Total Commander
https://www.ghisler.com
hawkie
Junior Member
Junior Member
Posts: 5
Joined: 2023-01-26, 07:41 UTC

Re: TC Unable to open files on rclone mount

Post by *hawkie »

Sure, setting this up should not take more than 10 minutes if you follow the instructions below:

Prerequisites:
- Download and install WinFSP from here : https://winfsp.dev/rel/
Per WinFSP doc: "Typically any information or storage may be organized and presented as a file system via WinFsp, with the benefit being that the information can be accessed via the standand Windows file API’s by any Windows application."

Next:
- Download rclone from website https://rclone.org/downloads/; I am using the Intel/AMD 64 bit version
- unpack zip file and extract to a folder (ex: c:\rclone)
- from command prompt go to rclone folder and run "rclone config"
- Choose "new remote" by pressing n and type a name (ex: gdrive)
- Type "drive" (to select Google Drive) - other remotes are also available ex: Dropbox,Amazon S3 etc
- for client_id and client_secret press Enter to select default (fine for testing)
- Next choose 1 (Full access all files)
- For service_account_file press Enter to leave empty
- Edit advanced config ? No
- Use browser to automatically authenticate rclone with remote? Yes
- Now allow through browser for rclone to access account
- After success message is received go back to rclone. Do not configure this as shared drive
- Config is now complete, press yes then quit config (q)
"rclone.conf" file will be now saved in c:\users\%username%\appdata\roaming\rclone.conf. Config can be redone if you remove the file.

For this test you can now just mount the drive from a command prompt by running:
rclone mount gdrive: c:\gdrive

You will now be able to see the GDRIVE folder under c:\gdrive along with all your stored drives under google.
Compare what happens when you double click a file in both Windows Explorer and Total Commander.

Thanks for your patience.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC Unable to open files on rclone mount

Post by *ghisler(Author) »

Thanks, I will try it!
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC Unable to open files on rclone mount

Post by *ghisler(Author) »

This should be fixed in TC 11 beta, please test it.
Author of Total Commander
https://www.ghisler.com
User avatar
LouisM--NL
Junior Member
Junior Member
Posts: 2
Joined: 2023-05-21, 20:12 UTC
Location: Amsterdam--NL

Re: TC Unable to open files on rclone mount

Post by *LouisM--NL »

I use TC 1100br3 1052 and lower versions All in 64 bits
I also use rclone with winsfp

Via rclone (and winfsp) I have mounted Google Photo with a drive letter ( O: ) in Windows
In Drive Properties it says Filesytem: FUSE-rclone

When I start TC 'normal' I can see the mounted Google Photo with its drive letter ( O: ) in TC

When I start TC 'Elevated as Administrator in the TC shortcut' I can NOT see the mounted Google Photo in TC. Drive Letter ( O: ) not there.
Typing O: in the TC commandline field is not responding.. So it definitively does not know it's there.
Spricht und schreibt auf Deutsch, Englisch u. Niederländisch
Speaks and writes in English, German and Dutch
Spreekt Nederlands, Duits en Engels
User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: TC Unable to open files on rclone mount

Post by *Dalai »

2LouisM--NL
That is pretty normal behavior for mapped network drives. Perhaps this FUSE-rclone behaves similarly. Try the same with CMD or any other program (which can be run elevated, i.e. not Explorer) and you'll see that TC is not the only program that can't see this drive when running elevated.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC Unable to open files on rclone mount

Post by *ghisler(Author) »

What does this have to do with the original bug report?
Author of Total Commander
https://www.ghisler.com
User avatar
LouisM--NL
Junior Member
Junior Member
Posts: 2
Joined: 2023-05-21, 20:12 UTC
Location: Amsterdam--NL

Re: TC Unable to open files on rclone mount

Post by *LouisM--NL »

ghisler(Author) wrote: 2023-05-22, 09:50 UTC What does this have to do with the original bug report?
I thought it could be relevant since I did not read whether the theme starter did run TC elevated or not.

With TC elevated for me TC is also Unable to open files on rclone mount, because the mount is then absent.
Spricht und schreibt auf Deutsch, Englisch u. Niederländisch
Speaks and writes in English, German and Dutch
Spreekt Nederlands, Duits en Engels
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC Unable to open files on rclone mount

Post by *ghisler(Author) »

With TC elevated for me TC is also Unable to open files on rclone mount, because the mount is then absent.
There is a reason for that: rclone uses the network drive interface to add its mounts and shares. On Windows Vista and newer, network drives are mapped separately for each user. Running a program "As admnistrator" is treated like a separate user. To fix it, either run Total Commander as a normal user, or do the following:
1. Run regedit.exe
2. Go to the following key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System
3. Right click in the right panel, and create a new DWORD entry with the name
EnableLinkedConnections
4. Set the value to 1
5. Restart your computer

Microsoft explains it here:
https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command

Unfortunately there is a bug on Windows 8 and 8.1 (and probably in 10/11 too): If a normal user creates a mapped network drive to a subfolder like \\server\share\subfolder, the elevated user will see the drive, but it points to \\server\share instead of pointing to the subfolder.
Author of Total Commander
https://www.ghisler.com
hawkie
Junior Member
Junior Member
Posts: 5
Joined: 2023-01-26, 07:41 UTC

Re: TC Unable to open files on rclone mount

Post by *hawkie »

Bug seems to be fixed now. Thank you!
Post Reply