Bug?: Copied files show with 0 bytes on PC connection

Support for Android version of Total Commander

Moderators: Stefan2, white, sheep, Hacker

Post Reply
morty
Junior Member
Junior Member
Posts: 5
Joined: 2017-03-13, 12:29 UTC

Bug?: Copied files show with 0 bytes on PC connection

Post by *morty » 2017-03-15, 08:57 UTC

Hi, i copied some files from one folder on the SD card to another folder using the copy button. This did work nicely at first glance.
They were accessible on my android device without any restriction, e.g. if media files are copied, they show up in the viewer ok.

But when i connect with USB to a PC (MTP) the copied files show up with 0 byte length in windows explorer or total commander.
They also can't be accessed which you might think would work with a symbolic link.

So i don't know what happened here.

I would guess the copy did indeed create symbolic links, but those aren't supported on the USB connection.
On the other hand the copied files do not look in any regard special when viewed on android total commander (no symbol that would indicate a link, file size is ok).
Ah i just recognized the anroid file manager shows a 0 byte length either.

Where's the switch to do a physical copy instead to create links (if this really is what happened here).

Used OS: 6.0, TC: 2.80b7 (but "defective" files were copied with older versions too).

Otherwise: Good work keep it up, registered user since more than a decade :-)

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

Post by *ghisler(Author) » 2017-03-15, 10:31 UTC

That's odd, TC tells Android to re-read the media cache (that's what Windows sees, not the actual file system).

Does it work when you unplug and reconnect the device to your PC?
Author of Total Commander
http://www.ghisler.com

morty
Junior Member
Junior Member
Posts: 5
Joined: 2017-03-13, 12:29 UTC

Post by *morty » 2017-03-15, 13:39 UTC

ghisler(Author) wrote:That's odd, TC tells Android to re-read the media cache (that's what Windows sees, not the actual file system).

Does it work when you unplug and reconnect the device to your PC?
The copies were made over weeks. Before that time i copied with the Android file manager which did work as expected. I switched to total commander and all the files i copied since are like i described.

I'd like to mention again that anroid file manager shows a 0 byte length either for the copies made with TC.

From your answer i assume you use a "low-level" copy function and anrdoid fails to sync some cache. Hmm, what can i give you for more debugging? Can i resync that media cache manually? (i have no root).

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

Post by *ghisler(Author) » 2017-03-15, 17:00 UTC

You can try to reload them manually in the media database:

In Android TC, create a new button, choose type "Internal command" and click on >> to pick command Nr. 130 (Refresh).

Then select the affected files/folders and tap on the button.
Author of Total Commander
http://www.ghisler.com

morty
Junior Member
Junior Member
Posts: 5
Joined: 2017-03-13, 12:29 UTC

Post by *morty » 2017-03-17, 01:34 UTC

That did the trick. Thank you.
Probably you can fix the automatic update? :)

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

Post by *ghisler(Author) » 2017-03-19, 09:19 UTC

TC calls the exact same function after copying a file. I don't know why this doesn't work for you...
Author of Total Commander
http://www.ghisler.com

morty
Junior Member
Junior Member
Posts: 5
Joined: 2017-03-13, 12:29 UTC

Post by *morty » 2017-03-21, 00:04 UTC

Hm funny then.. any chance i can give some additional input?
Is there some debug-log TC can store somewhere?

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

Post by *ghisler(Author) » 2017-03-21, 07:54 UTC

Can you give me the exact path names and file names with which that happens?
Author of Total Commander
http://www.ghisler.com

morty
Junior Member
Junior Member
Posts: 5
Joined: 2017-03-13, 12:29 UTC

Post by *morty » 2017-04-04, 20:52 UTC

Sorry for the delay... seems to happen to all media files on the SD-Card regardless the name or exact path...

Bucic
New Member
New Member
Posts: 1
Joined: 2010-03-23, 14:16 UTC
Location: Poland

Re: Bug?: Copied files show with 0 bytes on PC connection

Post by *Bucic » 2019-05-21, 22:03 UTC

Maybe what I'm experiencing is somewhat related. I'm not entirely sure but after losing a bunch of my photos I think in my case it goes like this:
1. TC used to move photos (with move command) from internal memory DCIM/Camera to <sdcard>/DCIM/Camera
2. After days or weeks: connected to PC via USB, File transfer mode, photos are moved (move command again, in Windows 7) from <sdcard>/DCIM/Camera to a directory on PC.

The result:
Files are being moved (they disappear from the phone's sd card) but the resultant files on the PC have 0 bytes and are unreadable. The last time it happened to a batch of my photos and videos the problem affected only photos. Videos were moved correctly.


Confguration:
Sandisk 32 GB SD card formatted to exFAT 32 KB allocation size
(since the last hiatus I re-formatted the card to FAT32 32 KB allocation size
LineageOS 14.1
Moto X Play

EDIT:
This issue effectively leads to data loss.

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

Re: Bug?: Copied files show with 0 bytes on PC connection

Post by *ghisler(Author) » 2019-05-23, 09:18 UTC

I'm currently not aware of any bugs in Total Commander or Android which could be causing this. Can you still open the photos on the card within Android?
Author of Total Commander
http://www.ghisler.com

User avatar
Usher
Senior Member
Senior Member
Posts: 378
Joined: 2011-03-11, 10:11 UTC

Re: Bug?: Copied files show with 0 bytes on PC connection

Post by *Usher » 2019-05-23, 19:20 UTC

Bucic wrote:
2019-05-21, 22:03 UTC
Confguration:
Sandisk 32 GB SD card formatted to exFAT 32 KB allocation size
(since the last hiatus I re-formatted the card to FAT32 32 KB allocation size
LineageOS 14.1
Moto X Play
This issue effectively leads to data loss.
Due to license limitations there may be problems with support for SD/SDHC/SDXC cards using non-default format. You should expect data loss when using such cards in photo cameras and other non-PC devices. Some devices may work OK but delete all data written to folders created by other devices or re-format card.
Regards from Poland
Andrzej P. Wozniak

Post Reply