?Don't delete files in path that have environment vars

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

Post Reply
Ciber SLasH
Junior Member
Junior Member
Posts: 9
Joined: 2013-04-25, 14:42 UTC

?Don't delete files in path that have environment vars

Post by *Ciber SLasH »

Hello!
I synchronize directories and found that the files are not deleted in folder:
"D:\Soft\Utils\_Portable\VMware ThinApp\Captures\.NET Framework 3.5 SP1\%SystemRoot%\assembly\NativeImages_v2.0.50727_32\UIAutomationProvider\##Attributes.ini"
Folder "assembly" in this path have hidden attributes.
Image: s1.ipicture.ru/uploads/20140525/C1zB3HBy.png
Video screen: youtu.be/zEb7EcVpfjw
TC 8.51a x86, TC 8.51a x64 - similarly. Synchronize - BAD.

In TC 8.01 x86 - similarly. Synchronize - BAD.
In TC 6.54a - all right. All folders are deleted. Synchronize - OK.

PS: OS Win7 SP1 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48024
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC supports env vars in the sync tool on purpose. You need to start the sync above such a directory if you want to sync it.
Author of Total Commander
https://www.ghisler.com
Ciber SLasH
Junior Member
Junior Member
Posts: 9
Joined: 2013-04-25, 14:42 UTC

Post by *Ciber SLasH »

The reason was not in the ENV.
If unpack this arc: rghost.ru/55878662
and synchronize directories - that nothing deleted.
In arc: dir with system attribute and some files.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It seems that TC expands envvars and path become invalid.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48024
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's what I wrote. Sorry, there is no solution, TC cannot offer support for env vars and then ignore them here...
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Problem is that TC reads exact paths from disk and then tries to expand envvars in them - it isn't needed at all, names are already correct, envvars should only be expanded in paths typed by user.
Ciber SLasH
Junior Member
Junior Member
Posts: 9
Joined: 2013-04-25, 14:42 UTC

Post by *Ciber SLasH »

MVV
Может вы объясните ему о баге. Я с инглишем с переводчиком.
Баг на лицо. Сделал видео-репорт (ссылка в первом посте) на ютубе.
Выложил архив на ргхост во втором посте. В архиве папка с атрибутом "системный" с некоторыми файлами. Если распаковать этот архив и с любой папки сделать ассиметричную синхронизацию с распакованным, то ничего не удалится из распакованного. Как я понял, из-за атрибута "системный" и именно этих файлов, которые там в папке.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Ciber SLasH,
Only English, please. To communicate with other users please use the email button.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48024
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Does it work when you start the synchronization above the problematic folder, e.g. here:
D:\Soft\Utils\_Portable\VMware ThinApp\Captures\.NET Framework 3.5 SP1

Then no env vars will appear in the left/right path fields of the sync tool, so there should be no problem.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I can't reproduce mentioned behaviour. Archive is already deleted, and when I try to create such folder tree with mentioned file, TC deletes it always. I tried different drives, hidden and non-hidden assembly dir, disabling empty dirs deletion etc.

However I found following: it I enter %SystemRoot% on any side dir and then start sync, TC reports that directory doesn't exist. Here TC really expands envvars making path invalid.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48024
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's what I meant - TC does expand env vars in the left/right path edit boxes, but not when a subdir below the start location contains env vars.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It would be useful to check if local path exists before expanding envvars... But it may be too slow to check all possible combinations of envvars/locals.
Post Reply