[2.03pb4] (FTP plg) File gets auto-deleted after 'DL+open'

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Bluestar
Senior Member
Senior Member
Posts: 377
Joined: 2007-06-10, 15:26 UTC
Location: Hungary
Contact:

[2.03pb4] (FTP plg) File gets auto-deleted after 'DL+open'

Post by *Bluestar »

Hi,

Maybe its a known problem, i'm not sure so better report it / ask the reasons: a downloaded file using TC's android FTP plugin gets automatically erased in case the user presses 'Home' button on the start of the procedure, and switches back to TC's dialog after it finished copying the file to the sdcard.

So the following simply doesn't works (although it would very practical):

01. Start Total Commander for Android
02. Try to run a huge .apk directly from FTP (so TC offers to DL+open it)
03. Press Home to do some other tasks while it does its job
04. Switch back after you gave it enough time to finish
05. TC complains about the file already got deleted instead of opening the apk and offering to install it (as usual)

[ Android: 4.1.2 - just tried and I can reproduce the above using TC 2.02 final too. ]

Other than this, I have to say this is the most awesome filemanager for android ever, and I tried dozens of them. Keep up the good work.

Regards,
Bluestar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC auto-deletes temp files when you return to TC from the other program. This is by design, because apps on Android don't really close - they continue to run in the background when there is enough memory. Therefore there is no other way to know when a temp file is no longer needed.
Author of Total Commander
https://www.ghisler.com
User avatar
Bluestar
Senior Member
Senior Member
Posts: 377
Joined: 2007-06-10, 15:26 UTC
Location: Hungary
Contact:

Post by *Bluestar »

@Christian:
Thanks for the reply, although I still think there is something that could be improved regarding this scenario.
For me it would even do the trick if TC could show a tiny notification in the top that "Copy finished" / "App ready to be started", or anything similar.

The main point would be that I think it shouldn't delete a just-copied 45MB apk file (for which the user waited for long minutes for the process to finish) automatically without specific user intervention.
» Developer of Total Updater & extDir utility.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

So when should TC delete TEMP files in your opinion? How should it find out that they are no longer needed?

Normally when you want to keep a file, you download it regularly with the blue "copy" button.
Author of Total Commander
https://www.ghisler.com
User avatar
Bluestar
Senior Member
Senior Member
Posts: 377
Joined: 2007-06-10, 15:26 UTC
Location: Hungary
Contact:

Post by *Bluestar »

@ghisler(Author):
Its actually pretty easy. Since I tapped on the "Download+open with" option after a simple press on the apk that can be found on the FTP server, I would assume that TC really _opens_ the file for me after downloading it.

But it isn't.

After the download sucessfully completes, TC just deletes the freshly downloaded & unused brand new file after returning to its activity, without letting the system ask if I'd like to install it or not.

In case I leave TC in the foreground after tapping on "Download+open" (or I switch back to TC's window right before the DL completes!) it opens the file properly, letting me install the apk - and only _then_ removes the temporary file.

So I only want to keep it until the system open dialog pops up (with Install / Cancel options), then TC is free to remove it (like it removes it properly with TC wnd in foreground).
» Developer of Total Updater & extDir utility.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You write something about leaving TC in the foreground. Do you mean that you switched to another app while downloading? Unfortunately this doesn't work with APKs because they are opened inside of Total Commander. Therefore you will have to wait until the download finishes when using "Download+open with".
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Can you try beta 2, please? It now supports background downloads from any plugin when using Download+Edit or Download+Open.
Author of Total Commander
https://www.ghisler.com
User avatar
Bluestar
Senior Member
Senior Member
Posts: 377
Joined: 2007-06-10, 15:26 UTC
Location: Hungary
Contact:

Post by *Bluestar »

@Christian:
I just tried beta 2 - and it works like a dream! Huge thanks for all the improvements and modifications! :wink:
It now even shows the current progress percentage in the notification bar, which is super cool + flashes when the task ends. Exceptional job. I can't thank you enough.

Have a Merry Christmas,

Regards,
Bluestar
Last edited by Bluestar on 2013-12-24, 17:31 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48166
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for trying it! The progress percentage had already been shown in older versions during regular uploads and downloads, just not during download+open/edit.
Author of Total Commander
https://www.ghisler.com
Post Reply