This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs Printable version
View previous topic :: View next topic  
Author Message
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Wed Feb 07, 2018 8:27 am    Post subject: View mode auto switch rule bug when using / as dir delimiter Reply with quote

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.)
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
chasbas
Junior Member
Junior Member


Joined: 06 Feb 2003
Posts: 50
Location: New Jersey

PostPosted: Wed Feb 07, 2018 8:45 am    Post subject: Re: View mode auto switch rule bug when using / as dir delim Reply with quote

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.
Back to top
View user's profile Send private message
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Wed Feb 07, 2018 8:54 am    Post subject: Re: View mode auto switch rule bug when using / as dir delim Reply with quote

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. Smile
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7802
Location: Valsted, Denmark

PostPosted: Wed Feb 07, 2018 10:41 am    Post subject: Reply with quote

Quote:
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.
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35761
Location: Switzerland

PostPosted: Thu Feb 08, 2018 4:55 am    Post subject: Reply with quote

I will probably not change this, but instead support backslashes for view modes also in FTP directories.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elgonzo
Senior Member
Senior Member


Joined: 04 Sep 2013
Posts: 377

PostPosted: Thu Feb 08, 2018 5:23 am    Post subject: Reply with quote

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 Wink

Quote:
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.
_________________
Windows 7 Pro x64 SP1
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35761
Location: Switzerland

PostPosted: Fri May 04, 2018 1:50 am    Post subject: Reply with quote

TC 9.20 beta 1 now supports backslashes for view modes in FTP directories, please test it!
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7802
Location: Valsted, Denmark

PostPosted: Fri May 04, 2018 8:44 am    Post subject: Reply with quote

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.
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus


Last edited by petermad on Wed May 09, 2018 2:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35761
Location: Switzerland

PostPosted: Sun May 06, 2018 2:58 am    Post subject: Reply with quote

Thanks, I only tried 3 (as the entry from the history shows). I will add cases 1 and 2 too!
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7802
Location: Valsted, Denmark

PostPosted: Wed May 09, 2018 1:59 pm    Post subject: Reply with quote

Confirmed fixed in TC 9.20b2 Smile
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group