Dir Synchronization - Copy file properties greyed out on empty directory structure

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *Dalai »

Hi all.

Steps to reproduce:
  1. Start TC with a fresh wincmd.ini:

    Code: Select all

    totalcmd.exe /i="%TEMP%\fresh.ini"
  2. Copy the TC program directory to a different location of your choice with the filter (Only files of this type) set to "foobar" or similar. The goal is to copy the directory structure but no files.
  3. Enable Options > Copy/Delete > Copy date/time of directories
  4. Change Options > Quick search to a setting other than Ctrl+Alt+Letter. This is important for the Dir Sync tool later.
  5. Change dirs to the TC program directory on the left and its empty copy on the right (or vice versa).
  6. Call TC Dir Sync tool, enable Subdirs and Equal files and click Compare button
  7. Mark all files (Ctrl+A)
  8. Right-click on the list. The Copy file properties items are both greyed out. IMO this is wrong because the directory synchronization is able to copy timestamps of directories, not just timestamps of files.
  9. Press Ctrl+Alt+L (or Ctrl+Alt+R). The Copy file properties dialog will pop up. Confirm the dialog to copy the timestamps. If you didn't change Quick search mode previously, pressing Ctrl+Alt+L/R will bring up the quick search dialog instead. No idea how to call the Copy file properties dialog in that case, but it looks like this is a clash of features that's been overlooked for many years (TC 8.52a has the same issue). Anyway, it doesn't matter for this bug report.
  10. Close Dir Sync tool and check the directory times in the empty directory structure. They should be the same as in the source. So the feature does what it's supposed to do when called by keyboard, but the context menu items are disabled by mistake.
  11. Copy a single file from source to the empty directory, e.g. totalcmd.exe, and repeat steps 6 through 8. The Copy file properties items are now enabled.
NB: The items are not greyed out in older TC versions (10.52 and older).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *petermad »

Confirmed - and I agree in the expectations described here above.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *ghisler(Author) »

Currently the option is only enabled when there are files on both sides in the selection.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *Dalai »

That's exactly the problem. The items should only be disabled when the list is empty, or when none of the shown directories of either side are present on the opposite side.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
TychoBarfy
Senior Member
Senior Member
Posts: 347
Joined: 2005-08-13, 15:13 UTC
Location: Berlin, Germany
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *TychoBarfy »

2Dalai And what if you want to copy the non existent empty folders to the other side and sync the rest for a backup of the new state?
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *Dalai »

Not sure what was unclear with my previous posts. If there's nothing to copy in terms of (file) properties, the items should be disabled. But in the case described in the OP, there is something to copy - and it works as expected when called via keyboard.

If the directory structure is not present on one side, there's nothing to copy, so the items should be disabled. If only some of the directories exist, the items should be enabled. It could be made dependent on the selection (all vs. some) but I'll leave that up to Ghisler.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *ghisler(Author) »

The problem is that this function only works with folders which are actually displayed. For example, when there is a file test.txt on BOTH sides located in folder
test1\test2\test3
but both test1 and test2 do not contain any files, then only
test1\test2\test3
shows up in the results with the file below it. This is done to reduce clutter, but makes it impossible to copy the timestamps of test1 and test1\test2. Copying of the folder timestamps is just a "bonus" to copying the timestamp of files because this could modify the timestamps of their parents.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *Dalai »

Why are the items disabled even when "Empty directories" is checked? TC should be able to copy timestamps in that case at least.

But I don't really get what is so difficult about this. It worked just fine in TC 10.52 and older, and it even works properly in TC 11 when the feature is called via keyboard. That is inconsistent and definitely not what a user expects. Users might think that a feature that used to be there doesn't exist anymore. Unless they try the keyboard combination by accident - since the items are disabled, a user has no reason to even try that.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *ghisler(Author) »

Why are the items disabled even when "Empty directories" is checked?
Because these directories are not empty, so they have a copy direction of zero and don't "exist" for the context menu. Trying to add them somehow would break a LOT of other functions. I don't want to risk that, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *Dalai »

ghisler(Author) wrote: 2023-12-27, 09:06 UTC
Why are the items disabled even when "Empty directories" is checked?
Because these directories are not empty
Huh? We're talking about a directory structure without files here, so the last level is definitely empty.
[...] so they have a copy direction of zero [...]
What does that even mean? And if they're not empty according to your statement above, how can they have no copy direction?
Trying to add them somehow would break a LOT of other functions. I don't want to risk that, sorry.
Well, how did older TC versions manage that?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *ghisler(Author) »

What does that even mean? And if they're not empty according to your statement above, how can they have no copy direction?
The directories exist on both sides, so they can't be copied in any direction (unlike files, which can be overwritten).
I think I found a possible solution, but it will require a lot of testing.
Well, how did older TC versions manage that?
The options were always enabled, which was also criticized here.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *Dalai »

ghisler(Author) wrote: 2023-12-28, 12:22 UTC
Well, how did older TC versions manage that?
The options were always enabled, which was also criticized here.
I thought as much. Still, did you consider to only disable the items in case there's nothing shown in the list as I described here viewtopic.php?p=447016#p447016 and the previous post?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *ghisler(Author) »

did you consider to only disable the items in case there's nothing shown in the list
No, the goal was to enable each option only when it does something when choosing it.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *JOUBE »

petermad wrote: 2023-12-22, 02:08 UTC Confirmed - and I agree in the expectations described here above.
? IIRC you pushed for it - together with white - and ensured that these - unnecessary and disruptive - changes were implemented. The changes made for version Tc11 now turn out to be not good and should be reverted. IMHO ghisler(author) fell into a trap against the interests of the users.

Support++. I fully support Dalai's bug report. To much restrictions in Tc11 in the name of user comfort.

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

Re: Dir Synchronization - Copy file properties greyed out on empty directory structure

Post by *ghisler(Author) »

No, there changes are good, but don't cover all possible cases - which can be fixed.
Author of Total Commander
https://www.ghisler.com
Post Reply