Empty vs virtually empty dirs

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Empty vs virtually empty dirs

Post by MSpagni »

I often meet an odd case.

Suppose you have an empty dir in a pane and a correspondent not empty dir in the other.
If all the files in the not empty dir are filtered out then that directory disappears completely and what you get from EDP is: "there is an empty dir in a pane with no correspondent dir in the other".

I find this a bit misleading.
Since often in my case even the other dir is actually empty, I found myself wondering why I forgot to copy that empty dir.

Anyway, that dir is not really "empty", so showing it that way is misleading again.

Perhaps a new indication that says "virtually" empty (after the filtering)?

Of course you get the popup saying "Some items were not compared", but you can't imagine that effect.
Unless, like me, you saw it so often, that is. :wink:

User avatar
psguru
Site Admin
Posts: 1926
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Empty vs virtually empty dirs

Post by psguru »

Could you post some screenshots to illustrate the issue?
psguru
PrestoSoft

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

Sure.
Here they come.
Attachments
NoFilter.jpg
NoFilter.jpg (50.69 KiB) Viewed 15041 times
Filtered.jpg
Filtered.jpg (40.17 KiB) Viewed 15041 times

User avatar
psguru
Site Admin
Posts: 1926
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Empty vs virtually empty dirs

Post by psguru »

I'm not sure if there's anything that can improve this. In your example you have no items in the left pane but you may have some items and yet all items that are in the matching (to the right-side empty folder) folder are filtered out, making it invisible. How can this be visualized?

One thing that is always there is the little filter icon in the status bar below the pane, whose tooltip says how many items were filtered out. It does tell you that not all items are visible. You can always toggle the Filter toolbar button to show all item if you are about to copy a folder from one side to the other.
psguru
PrestoSoft

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

I have no clear idea on what to suggest. I leave it to you imagination.
Maybe showing it in a similar way as the real empty dirs, the same icon, but with a different caption, for example "All contained elements filtered out".
It should not be too difficult to implement and, at least for me, useful.
Of course, I think I'll survive even without it. :wink:

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

Today I stumbled again on this very issue.
It seems the dir doesn't exist, but this is misleading.
Why doesn't it show at least the "virtually empty" dir as a standard empty dir?

User avatar
psguru
Site Admin
Posts: 1926
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Empty vs virtually empty dirs

Post by psguru »

I'm not sure that would help, or easy to implement. On the other hand, you can always see the active (red) filter icon in the status bar of a filtered directory as a reminder that some items were filtered out. Hovering mouse over it also shows how many items were not compared.
psguru
PrestoSoft

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

I disagree.
The directory is present and is not filtered. What is filtered are the files inside it, not the directory itself.
And since I want to see all the (non filtered, of course) directories, even the empy ones, then I'd like to see this one too.
I don't expect this feature to be difficult to implement but, of course, I can be wrong.

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

Sorry for being such a p.i.t.a. :mrgreen: but I keep stumbing on this issue and I find it very annoying.
Now, let me resume the situation.

First of all, I want to see all the directories, both full and empty.
Normally this is the case and is perfect.
If the directory is empty is is shown as such, while if containing files only the files are shown.

Second: I don't care about some files (like, for example, Thumbs.db, *.tmp, *.bak etc.), i.e. I apply a filter.
In this case I expect that a directory in which all the files are filtered out to be shown as "empty".
Even better if in some way it can be shown as "virtually empty" so as to know that it's not really empty and I must be careful to delete it.

What happens instead? That the "virtually empty" directory simply disappears, making me wondering, for example, why I forgot to copy that empty (but important) directory in the other tree.

Or also, after removing a block of files (and dirs) to "prune" a tree, I'm convinced I also removed the empty directories since I don't see them anymore. But in reality they are not really empty, so they are not (correctly!) removed, but I can't see them.
I need to redo the compare with the filters disabled. Very annoying when the files are a lot and, possibly, on a USB (1.1?) drive.
N.B. Yes, I know that a dialog shows a list of the directories that will be deleted because they are just become empty, but I don't want to double check the list each time, in special mode when the list is long.

User avatar
psguru
Site Admin
Posts: 1926
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Empty vs virtually empty dirs

Post by psguru »

After reviewing your argument and looking at actual comparisons, I still can't image how this can be handled. Having said that, there's actually one indicator that allows you to "see" that some files were filtered out opposite of an empty directory. Here's an unfiltered example:
Virtual Dirs 1.png
Virtual Dirs 1.png (96.21 KiB) Viewed 10253 times
And here's a filtered one:
Virtual Dirs 2.png
Virtual Dirs 2.png (74.35 KiB) Viewed 10253 times
As you can see in both examples, the right-side empty directory, a, cannot be copied to the left since there files on the left side in directory a. So this is that indicator I was talking about, and it should let you know that even after filtering there are files on the left side.
psguru
PrestoSoft

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

Yes, right that.

Usually I don't do a double check. I just compare two directory trees with the filter on.

Look at the filtered screenshot
Supposing I remember there was an "a" subdir, surely I'll ask myself: and the "a" subdir where is gone?

Then I must say that I often compare deep (...tall?) trees and also prune one or many branches, not just a single directory, so I can't remember if and which subdirs must be there (empty or not).
And the indicator "some items were not compared", that you hope can alert me, passes quite undetected for it's normal for it to appear because for sure in such trees at least a filtered file is present (the boy who cried wolf).
the right-side empty directory, a, cannot be copied to the left since there files on the left side in directory a.
Yes, indeed it is so, but... why not?
I still can't image how this can be handled
Why not like any other empty directory, for example?

User avatar
psguru
Site Admin
Posts: 1926
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Empty vs virtually empty dirs

Post by psguru »

Yes, indeed it is so, but... why not?
Because there's nothing to copy. If the destination was not there at all, you would be able to copy the empty subdirectory. If you already have files in the matching subdirectory, there's nothing to copy.
Why not like any other empty directory, for example?
Because it's too hard to implement and hence prone to errors, and, in our opinion, is not worth it. Empty directories are already a major PITA as they always have to be considered when file operations are performed and no refresh occurred, so adding yet another abstraction is going to seriously destabilize the code base.
psguru
PrestoSoft

MSpagni
Expert Member
Posts: 437
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Empty vs virtually empty dirs

Post by MSpagni »

the right-side empty directory, a, cannot be copied to the left since there files on the left side in directory a.

Yes, indeed it is so, but... why not?

Because there's nothing to copy. If the destination was not there at all, you would be able to copy the empty subdirectory. If you already have files in the matching subdirectory, there's nothing to copy.
Yuk, you're right. I looked at the wrong screenshot!
Do you see what happens when it looks like a subdir is not there? :wink:

Consider instead having something like this (regular empty directories):
Clipboard01.jpg
Clipboard01.jpg (30.25 KiB) Viewed 10230 times
Of course the "copy" arrow is not there.
it's too hard to implement and hence prone to errors, and, in our opinion, is not worth it. Empty directories are already a major PITA as they always have to be considered when file operations are performed and no refresh occurred, so adding yet another abstraction is going to seriously destabilize the code base.
Well, if this is the situation then I can't argue anymore and just trust you, but it didn't look so difficult...

"Nothing is impossible for the man who doesn't have to do the work." :D

JeremyNicoll
Expert Member
Posts: 80
Joined: Sun May 02, 2010 12:00 pm
Location: Edinburgh

Re: Empty vs virtually empty dirs

Post by JeremyNicoll »

In the 'Virtual Dirs 1.png' screenshot, there's a set of 15 files listed in the lefthand pane, all in relative dir .\a\ and there's a green copy arrow that would allow you to copy all 15 of them to the righthand pane.

I understand, I think, that the 'a' folder shown at the top of the righthand pane doesn't have a copy arrow for copying back to the lefthand pane, because the lefthand pane must already have an 'a' folder, otherwise how could those 15 files have been listed?

But why does the lefthand pane not show an entry for an 'a' folder?

User avatar
psguru
Site Admin
Posts: 1926
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Empty vs virtually empty dirs

Post by psguru »

But why does the lefthand pane not show an entry for an 'a' folder?
Because it's not really empty, and discussing that was what the whole thread is about.
psguru
PrestoSoft

Post Reply