Incorrect directory size shown.

Things you’d like to miss in the future...
Gandolf

Incorrect directory size shown.

Post by Gandolf »

Show folder sizes in file list enabled.
Using Beyond Compare to compare two directories.
Delete all the files from one of the directories using Beyond Compare, and by-passing the Recycle Bin.
XY does not show the directory as empty, which it is (confirmed by another file manager), but some random size.
e.g.
132,674,469 before deletion, changes to 5,883,028 after deletion
111,519,180 changes to 98,739
102,499,715 changes to 89, 628

Where is XY getting this totally irrelevant directory size from?

Manually refresh the list and the directories then show as empty.

Autorefresh is ON (obviously), however, the size is never correctly updated (well, not after several hours at least) but autorefresh is obviously (partially?) working, otherwise the size would never change in the first place.

Two directories have displayed correctly as [Empty] then the third one as rubbish, so it's totally unreliable.


That was some weeks ago. Now I have some spare time I've checked again with a cold install of XY - it's the same so nothing to do with my ini file. Displaying XY and three other file managers (in a quad split) the other file managers all update correctly. It also applies if another file manager (or any application?) is used to delete the files, so it's not related to Beyond Compare either.

I expect it's related to the previous problem (which has never been cured) I've reported of zero size being displayed for files after a copy by an external application.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Incorrect directory size shown.

Post by admin »

If I get you right, the last Auto-Refresh was not triggered for one of the emptied directories. I see this once in a while (not reproducible at will) with WinZip when it creates in archive. F5 takes care of it.

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

So you KNOW that autorefresh does not work 100%. Are you going to fix it? If not, then it's pointless having autorefresh if the user has to manually refresh every time, just in case it is giving the wrong information. The very worse error condition is the intermittent one where the program cannot be relied on to give the correct result.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Incorrect directory size shown.

Post by admin »

Gandolf wrote:So you KNOW that autorefresh does not work 100%. Are you going to fix it? If not, then it's pointless having autorefresh if the user has to manually refresh every time, just in case it is giving the wrong information. The very worse error condition is the intermittent one where the program cannot be relied on to give the correct result.
Forward this to MS. Their notification system is known to be unreliable. Another factor is the apps that trigger the action: they must notify the system.

Are you 100% sure that "the other file managers" work 100%. I doubt it. Not under Windows.

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

YES.

That is why I didn't post the problem until I'd had time to confirm it.

I did a check with four different file managers, in a quad split, all displaying the same directory with 31 sub-directories. Deleting the files using a fifth file manager resulted in XY not always showing the directories as empty, but the other three always did.

Furthermore, you will have seen from another post of mine that I have a retired Microsoft employee and his wife staying with me. He has spoken to friends at Microsoft and they are not aware of any reports of Windows causing such a problem. They said that if you are convinced it is a Windows problem then why don't you, as the developer of XYplorer, report the problem to them detailing what Windows routines you are calling, and how you are dealing with them. You are in a far better position than a user since, if they suggest a cure, you can attempt to implement it.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Incorrect directory size shown.

Post by admin »

Gandolf wrote:YES.

That is why I didn't post the problem until I'd had time to confirm it.

I did a check with four different file managers, in a quad split, all displaying the same directory with 31 sub-directories. Deleting the files using a fifth file manager resulted in XY not always showing the directories as empty, but the other three always did.

Furthermore, you will have seen from another post of mine that I have a retired Microsoft employee and his wife staying with me. He has spoken to friends at Microsoft and they are not aware of any reports of Windows causing such a problem. They said that if you are convinced it is a Windows problem then why don't you, as the developer of XYplorer, report the problem to them detailing what Windows routines you are calling, and how you are dealing with them. You are in a far better position than a user since, if they suggest a cure, you can attempt to implement it.
I will do that when I can reproduce the problem. The WinZip issue I mentioned is so rare that I never could catch it red-handed.

So you delete HOW MANY files?
And you delete NOT TO RECYCLER, right?
How long does the deletion job take approximately? More than 1 second?

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

Approximately 800 to 1200 files, total size 80 to 120 Meg, per sub-directory. There are a couple of very small text files, about a dozen HTML files, of size 10k or so each, and the remainder are images.
Bypass the recycle bin using the programs command not the Windows setting on the recycle bin.
A few seconds with Beyond Compare, because the files are already cached after the compare. Obviously it's longer when I was testing with a file manager if the files aren't cached.

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

Update:
Just tried on a USB stick (therefore no option to delete to recycle bin) using a file manager to delete the files. 733 files, total size 30,069,467 bytes spread across 24 sub-directories. Deletion of files and sub-directories took under 3 seconds, XY did not show the directory as empty, but 2,114,519 bytes.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Incorrect directory size shown.

Post by admin »

Gandolf wrote:Update:
Just tried on a USB stick (therefore no option to delete to recycle bin) using a file manager to delete the files. 733 files, total size 30,069,467 bytes spread across 24 sub-directories. Deletion of files and sub-directories took under 3 seconds, XY did not show the directory as empty, but 2,114,519 bytes.
OK, that helped. I should have fixed it.

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

If you believe it's related to sub-sub-directories then that's not the case. The three original directories I posted the sizes for had no sub-directories, as is indeed the case with almost all the directories I deal with. Only the example I tried this morning on the USB stick had heavily nested sub-directories, and that was just to check if it was related to size or number of files.

I'll let you know what happens the next time I do a compare & delete operation. Fingers crossed you've fixed it.

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

Tried on a very small sample, three directories (with only 25 files each, no sub-directories and directory sizes about 3 Meg). Two out of three did not show as empty.

Just out of interest I copied some files to a directory that was empty, but did not show as empty, and the size displayed increased immediately. So, nothing wrong with auto-refresh when adding files, just when deleting and leaving an empty directory.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Incorrect directory size shown.

Post by admin »

Gandolf wrote:Tried on a very small sample, three directories (with only 25 files each, no sub-directories and directory sizes about 3 Meg). Two out of three did not show as empty.

Just out of interest I copied some files to a directory that was empty, but did not show as empty, and the size displayed increased immediately. So, nothing wrong with auto-refresh when adding files, just when deleting and leaving an empty directory.
I have seen a bug there and I fixed it. Now I cannot reproduce the problem anymore.

So you see three directories in the file list, then you delete their contents (all files) with another app, and the file list does not auto-update the folder sizes? Not here.

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

More than three directories, there were about thirty and I deleted the contents of three of them.

Well, we're down to oddities with SCSI removable drives again by the looks of things and, since all my main drives are of that type, it looks like no solution.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Incorrect directory size shown.

Post by admin »

Gandolf wrote:More than three directories, there were about thirty and I deleted the contents of three of them.

Well, we're down to oddities with SCSI removable drives again by the looks of things and, since all my main drives are of that type, it looks like no solution.
I did my tests with a USB stick. Can you still reproduce the bug with a USB stick?

Gandolf

Re: Incorrect directory size shown.

Post by Gandolf »

The USB test was a one off and something I would hardly ever do. I'll check later with a similar setup to see what happens.

Post Reply