View mode auto switch rule bug when using / as dir delimiter

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

View mode auto switch rule bug when using / as dir delimiter

Post by *gdpr deleted 6 »

TC is getting confused when using a directory pattern involving forward slashes (like "*xyz/*" or "*xyz/abc/*", for example) and treats it as part of a file type pattern instead.

As discussed here (http://ghisler.ch/board/viewtopic.php?p=337749#337749):
chasbas wrote:I had actually tried this. TC decides that any Directory with a / in it really belongs in the File Types field; it concatenates the Directory value with the File Types value and puts the result in the File Types field, while blanking out the Directory field. To verify this you have make TC re-load this Rule - clicking briefly on a different Rule, then back to the current Rule, will show how the new information has been stored.

This behavior is so specific that it seems like it is done by design, rather than being a bug.
(emphasis mine)

The thread i linked above also explains why it could make sense to have directory patterns with forward slashes (like, defining rules that apply to FTP connections).

(I could reproduce the described behavior with TC32 and TC64 9.12 on my Win7 Pro x64 box.)
chasbas
Junior Member
Junior Member
Posts: 52
Joined: 2003-02-06, 16:01 UTC
Location: New Jersey

Re: View mode auto switch rule bug when using / as dir delim

Post by *chasbas »

elgonzo wrote:The thread i linked above also explains why it could make sense to have directory patterns with forward slashes (like, defining rules that apply to FTP connections).
Along with the above issue, please note the other thing I mentioned in the thread elgonzo quoted: that Auto Switch value F (FTP Connection) does not work when AND-ed with any other sub-rule.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: View mode auto switch rule bug when using / as dir delim

Post by *gdpr deleted 6 »

chasbas wrote:Along with the above issue, please note the other thing I mentioned in the thread elgonzo quoted: that Auto Switch value F (FTP Connection) does not work when AND-ed with any other sub-rule.
If this is really the case (which i am currently not certain of, as your problem so far could be attributed to a misinterpreted directory pattern) then please note that this would be different from the bug i filed here and should rather be posted as its own bug report instead of overloading one bug report with reports of different issues. :)
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Along with the above issue, please note the other thing I mentioned in the thread elgonzo quoted: that Auto Switch value F (FTP Connection) does not work when AND-ed with any other sub-rule.
It is not the case - see http://ghisler.ch/board/viewtopic.php?p=337750#337750 - the problem is that TC treats directories with / in it as a file pattern - It should be allowed to use / in directories - at least when the F-rule (FTP) is used before the +Match rule.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will probably not change this, but instead support backslashes for view modes also in FTP directories.
Author of Total Commander
https://www.ghisler.com
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

ghisler(Author) wrote:I will probably not change this
Why? What's the point of this behavior?
While i can understand you not wanting to spend effort for supporting forward slashes, make the rules GUI at least reject directory patterns containing forward slashes, or let it automatically convert forward slashes into backslashes.
The current behavior of TC in this regard is as meaningful as the behavior of a stoner on a LSD trip -- it is totally bonkers with a touch of silliness, is what i am saying ;)
but instead support backslashes for view modes also in FTP directories
Keep in mind that file names on ftp servers can contain backslashes, so take care that encountering such "backslash file names" does not break the view mode mechanism in TC in weird unforeseen ways.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC 9.20 beta 1 now supports backslashes for view modes in FTP directories, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Thanks for implementing this. It is a little confusing though:

1)
If I use this rule on lokal harddisk:
+*\myfolder\*\
it applies to myfolder and all subdirs
If I use this rule on an FTP server:
+*\myfolder\*\ & F
it only applies to subfolders to myfolder, not to myfolder itself.

2)
If I use this rule on lokal harddisk:
+*\myfolder\
it applies to myfolder but not to subdirs, as expected.
If I use this rule on an FTP server:
+*\myfolder\ & F
it does not apply to neither myfolder nor its subfolders

3)
If I use this rule on lokal harddisk:
+*\myfolder*\
it applies to myfolder and subdirs
If I use this rule on an FTP server:
+*\myfolder*\ & F
it also applies to myfolder and subdirs

So 3) is the only rule that works the same on Local disk and FTP, but 3) also applies to other folders like myfolder2 or myfolder_somethingelse

So it is not possible on FTP so set a rule that only applies to one specific foldername.
Last edited by petermad on 2018-05-09, 20:00 UTC, edited 1 time in total.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks, I only tried 3 (as the entry from the history shows). I will add cases 1 and 2 too!
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed fixed in TC 9.20b2 :-)
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply