Weird problem with file shortcuts

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Chip Hazard
Junior Member
Junior Member
Posts: 4
Joined: 2021-01-05, 20:47 UTC

Weird problem with file shortcuts

Post by *Chip Hazard »

Hello everyone!

I've noticed a strange problem with Total Commander: In versions 3.0 and above, when I use TC to add a file shortcut to my desktop, the underlying file becomes unwriteable (saves seem to work, but when you close and reopen the file, all changes are lost). In version 2.91 and below, "save" still works as expected.

The odd thing is I've had the same problem with Mixplorer before (which is why I gave up Mixplorer and stuck with Total Commander). So I guess this is not a solitary glitch or bug, but something else is going on here. For further reference: Augustro File Manager 1.5 pro works fine, too.

Phone is running Android 9 (Lineage 16).

PS: Why would it make a difference which file manager adds the shortcut? Because obviously, it does.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Weird problem with file shortcuts

Post by *ghisler(Author) »

Which app is used to modify the file? It should work with TCs internal editor. Other apps may not be able to save the file when the data is provided via content: URL as TC 3.0 does on Android 10 (the launcher crashes with file urls).
Author of Total Commander
https://www.ghisler.com
User avatar
Chip Hazard
Junior Member
Junior Member
Posts: 4
Joined: 2021-01-05, 20:47 UTC

Re: Weird problem with file shortcuts

Post by *Chip Hazard »

Hm, this sounds like you know what the problem is (which is great). No, this is a spreadsheet file which launches a spreadsheet app.

As a Windows/Linux guy, I thought that shortcuts are "neutral" and you get the same result as if you'd be clicking on the original file. I guess that's not the case here?

And if something doesn't work in version #3 that used to work in version #2.9, why isn't this a glitch? :wink:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Weird problem with file shortcuts

Post by *ghisler(Author) »

Shortcuts can point to anything which is an URL. In earlier Android versions, they were mostly pointing to files in the file system, e.g.
file:///storage/emulated/0/path/file.extension

Unfortunately Google wants to restrict access to the file system for "privacy" reasons, so an app now crashes when launching a link pointing to a file URL unless you set special flags (which the launcher doesn't do). Instead of file: urls, Google now promotes content: URLs. These point to a so called content provider, which then provides the data to the called app. While content providers also support writing, not all apps support that.

When creating a link in TC, there is a checkbox "Parameter: content://url". Try unchecking this. TC then still uses a content URL internally, but this launches a TC activity, which then opens the file as a file: URL. This should work with your spreadsheet app too.

TL/DR: Delete the shortcut and create a new one where "Parameter: content://url" is unchecked.
Author of Total Commander
https://www.ghisler.com
User avatar
Chip Hazard
Junior Member
Junior Member
Posts: 4
Joined: 2021-01-05, 20:47 UTC

Re: Weird problem with file shortcuts

Post by *Chip Hazard »

Thanks for the information and the instructions - after unchecking "Parameter: content://url" everything works just fine!
Post Reply