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 

TC tries to open .tab files as archive with packer plugin

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


Joined: 28 Jan 2005
Posts: 6049
Location: Meiningen (Südthüringen)

PostPosted: Thu Jan 04, 2018 2:29 pm    Post subject: TC tries to open .tab files as archive with packer plugin Reply with quote

Hi there.

Up until HolgerK's post in the thread C# How to make Total Commander execute a command? I didn't know that TC can open .tab files specified on command line. Since this didn't work with my regular wincmd.ini, but it did with a fresh wincmd.ini I tried to find out what the culprit is.

And I had success. In my case it's a packer plugin for STALKER archive files.

The bug:
When the plugin is registered like this:
Code:
db0=448,%COMMANDER_PATH%\Plugins\stalker\stalker.wcx
and you try to start TC with some .tab file, e.g.
Code:
[activetabs]
0_path=C:\Windows\
0_options=1|0|0|0|0|0|0|
1_path=C:\Windows\
1_options=1|0|0|0|0|0|0|
activetab=1
[inactivetabs]
0_path=C:\Windows\
0_options=1|0|0|0|0|0|0|||10001
1_path=C:\Windows\
1_options=1|0|0|0|0|0|0|||10001
activetab=1

specified on command line like this:
Code:
TOTALCMD.EXE e:\a.tab
results in TC's error message
Code:
---------------------------
Total Commander
---------------------------
Error in packed file E:\a.tab!
---------------------------
OK   
---------------------------

Replacing the 448 with 384 - i.e. removing the ability to detect archive type by content - solves the issue.

Expected behavior: TC should open the tabs given in the .tab file instead of trying to open the file as an archive.

I tried to reproduce this with other packer plugins (7zip, img/ima, chm), but had no luck. So it seems it depends also on the packer plugin itself. Either way, for me it's a TC bug, because it shouldn't even try to use any packer plugin for the .tab file (why should it?).

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
Hacker
Moderator
Moderator


Joined: 06 Feb 2003
Posts: 10891
Location: Bratislava, Slovakia

PostPosted: Thu Jan 04, 2018 3:27 pm    Post subject: Reply with quote

Dalai,
Quote:
for me it's a TC bug, because it shouldn't even try to use any packer plugin for the .tab file (why should it?)

Because a .tab file might be an archive?

Roman
_________________
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.
Back to top
View user's profile Send private message Send e-mail
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6049
Location: Meiningen (Südthüringen)

PostPosted: Thu Jan 04, 2018 3:40 pm    Post subject: Reply with quote

2Hacker
TC can try to open .tab files as an archive, but not the one specified as TC command line parameter. Yes, sure, there might be archives with this extension. Maybe it's better to introduce another command line switch (like /TF, for tab file) that takes the .tab file as argument. But I already know what Ghisler is going to say about such a suggestion Wink.

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups


Last edited by Dalai on Thu Jan 04, 2018 5:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Hacker
Moderator
Moderator


Joined: 06 Feb 2003
Posts: 10891
Location: Bratislava, Slovakia

PostPosted: Thu Jan 04, 2018 4:51 pm    Post subject: Reply with quote

Dalai,
Does /A help?

Roman
_________________
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.
Back to top
View user's profile Send private message Send e-mail
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6049
Location: Meiningen (Südthüringen)

PostPosted: Thu Jan 04, 2018 5:01 pm    Post subject: Reply with quote

Nope. /A was the first thing I tried. It only prevents that TC tries to open the .tab file as archive, but it doesn't open the saved tabs either...

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

PostPosted: Mon Jan 08, 2018 9:56 am    Post subject: Reply with quote

TC accepts also archives via command line. They take precedence over .tab files. If a plugin indicates that it supports the format, TC will therefore pass the file to the plugin.

I can add a function where the tab file is handled internally if all the packer plugin calls fail.
_________________
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
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6049
Location: Meiningen (Südthüringen)

PostPosted: Fri Jan 12, 2018 2:21 pm    Post subject: Reply with quote

Maybe TC could check if the .tab file supplied via command line is a (valid) TC .tab file and if it is, skip the packer plugins altogether. In other words: Lower the priority given to packer plugins in this specific case (.tab files). However, I don't know if this would be more complex and/or complicated to check, so it's up to you to decide which way is the best one.

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

PostPosted: Mon Jan 15, 2018 10:06 am    Post subject: Reply with quote

They are just text files in .ini format, which may be used by plugins 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
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6049
Location: Meiningen (Südthüringen)

PostPosted: Mon Jan 15, 2018 10:50 am    Post subject: Reply with quote

ghisler(Author) wrote:
They are just text files in .ini format, which may be used by plugins too...

Uh, used by packer plugins? I think the probability for this is very very small. And, as I said, TC could only skip the packer plugins if it's a valid .tab file that was specified via command line. This suggestion doesn't apply to a running TC where packer plugins should get the priority of course.

Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

PostPosted: Thu Jan 18, 2018 4:51 am    Post subject: Reply with quote

For example, the diskdir plugin uses text files to store just names, sizes and timestamps of files/folders.
_________________
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
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35752
Location: Switzerland

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

This should be fixed in TC 9.20 beta 1, 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
Dalai
Power Member
Power Member


Joined: 28 Jan 2005
Posts: 6049
Location: Meiningen (Südthüringen)

PostPosted: Fri May 04, 2018 12:16 pm    Post subject: Reply with quote

After figuring out how I reproduced this bug (I definitely have too many machines Wink), I can now confirm that I'm not able to reproduce it on TC 9.20 beta1. So I can confirm this bugfix:
Code:
23.03.18 Fixed: Command line parameters: Always treat file with extension .tab as a directory tab file, even when a packer plugin claims the extension for itself (32/64)


Regards
Dalai
_________________
#101164 Personal licence
Athlon X4 880K, 16 GiB RAM, Gigabyte F2A88X-D3HP, Win7 x64

Plugins: Services2, Startups
Back to top
View user's profile Send private message Send e-mail
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