Bug: extsd: Editor's changes not saved after switch to TC4A

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Bug: extsd: Editor's changes not saved after switch to TC4A

Post by *DrShark »

To reproduce:
1. Open some text file on external SD Card in TC Editor.
2. Change it.
3. Switch to Android Home Screen. The message will appear informing that changes saved to a temp file.
4. Launch TC4A.
5. The request will appear to save the original edited file, confirm it:
error opening original file will appear then. Open original file in TC Editor and see that changes are not present in original file.

Expected behavior: after confirmation in step 5 changes should be applied to original file, which happens when TC Editor changes the file in Internal Memory.

Reproduced on Android 4.3.1 with TC4A 2.80 final.
Last edited by DrShark on 2017-08-13, 16:19 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This currently happens when you are rooted. I'm working on a solution.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author) wrote:This currently happens when you are rooted.
My device isn't rooted (mentioned in post signature).
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, cannot reproduce. There should be no problems to write to SD card on Android 4.3. The restrictions only came with Android 4.4.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

No changes on my device in 2.81 beta 7. Maybe the next fact will help to find out the reason of the bug: temp (<partofname><randomcharacters>.<ext>) files, and maybe even successfully files (with original name) arn't auto-removed from /storage/sdcard/.TotalCommander/temp folder. Or this is normal behavior? Currently I have 15 text files there...
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I didn't change anything for Android 4.3 because I couldn't reproduce the issue. It's possible that your device maker has stronger restrictions than Google. Did you try with an older TC like 2.72?

You can get it here:
http://www.totalcommander.ch/android/tcandroid272.apk
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author) wrote:Did you try with an older TC like 2.72?
Should I uninstall 2.81 beta 7 at first?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

DrShark wrote:Should I uninstall 2.81 beta 7 at first?
The installer couldn't install 2.72 on top of 2.81b7 so I uninstalled the beta. On clean 2.72 I can reproduce the issue too.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Then your specific Android ROM probably doesn't support the necessary functions to write to the card, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author) wrote:Then your specific Android ROM probably doesn't support the necessary functions to write to the card, sorry.
But most of other write-related functions on extsd work: Save button and Save As menu in TC4A editor are saving the file (which means I can edit files in editor), I also can create, copy and move folders, as well as copy and move files using TC4A file manager itself on and to/from extsd. Rename of files and folders on extsd also works.
The first post describes only particular case whan saving the file fails, and in other topic I mentioned the issue with creating of new text files on extsd using file manager (not editor!) menu item. So far those are only write-related issues I discovered on extsd using TC4A and its editor.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You mean that saving only fails when the file was previously saved in TEMP because youz switched away from the editor? Or does saving files always fail in the editor?
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author) wrote:You mean that saving only fails when the file was previously saved in TEMP because youz switched away from the editor?
Yes, exactly.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

history2.txt wrote:2017-08-24 Fixed: Editor: Leave editor via home button without saving (auto-saves to temp), return to TC -> file couldn't be moved from temp to external SD card in the form ///_SD-Card/s on Android >=5
2017-08-24 Fixed: Editor: Leave editor via home button without saving (auto-saves to temp), return to TC -> file couldn't be moved from temp to external SD card on Android 4.3
I can confirm the fix on device with Android 4.3.1, thanks. Unfortunately the device with Android 5.1, which I sometimes have access to, doesn't have a microsd slot, so I can't check it there.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply