cd [file] does not set cursor to file if archive test fails

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

cd [file] does not set cursor to file if archive test fails

Post by *Flint » 2011-10-02, 16:54 UTC

1. Start TC with clean INI.
2. Install the StalkerDB plugin.
3. Type in the command line, for example, cd C:\totalcmd\DEFAULT.BAR
4. TC opens the directory C:\totalcmd, then displays the message:

Code: Select all

---------------------------
Total Commander
---------------------------
Error in packed file C:\totalcmd\DEFAULT.BAR!
---------------------------
ОК   
---------------------------
5. After pressing OK the cursor is on the [..] element instead of DEFAULT.BAR file.

Reproduced in TC 7.56a and 8.0β3.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 2790
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA » 2011-10-02, 17:43 UTC

a) what is this stalkerdb? (ie what does it do) cant find it on totalcmd.net

b) when the error ONLY occurs after installing Stalkerdb that means its a stalkerdb error cause without it i CANT reproduce it
(beta 3)

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-02, 19:11 UTC

Sir_SiLvA wrote:a) what is this stalkerdb? (ie what does it do) cant find it on totalcmd.net
Its name in my post is a link. :) I wanted to copy-paste its name from the site but forgot and leaved the name of the directory it's installed in on my PC.
Sir_SiLvA wrote:b) when the error ONLY occurs after installing Stalkerdb that means its a stalkerdb error cause without it i CANT reproduce it
WCX plugin must not have any influence on setting cursor in TC's file panels, so my guess is that this is how TC reacts to some specific error code returned by plugin.

It's possible that the plugin is wrong returning this code, but TC should not jump away from the file just because it's so scary. :)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 2790
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA » 2011-10-03, 18:14 UTC

Flint wrote:WCX plugin must not have any influence on setting cursor in TC's file panels
Oh realy? now that would make cd and wcx-plugins kinda useless dont you think?

your cd command works fine as long as you dont install that game-archive-plugin wich steals the *.bar-extension telling tc: "dont treat .bar-files as files anymore - they are now archives you can look into"
thus tc tries to look into the file wich ofc doesnt work as its only a plain text-file.

Without that Plugin your cd-command works fine.
With the plugin it doesnt because tc expects to set the cursor on the ".." INSIDE the default.bar-archive wich doesnt work ofc

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-03, 19:23 UTC

Sir_SiLvA wrote:Oh realy? now that would make cd and wcx-plugins kinda useless dont you think?
No, I don't. Why? Plugin is doing only upnacking, testing for errors, returning unpacked contents. Total Commander is doing all the navigation, displaying received contents in the file panels. When I write a WCX plugin I don't process the TC's cd commands, I don't decide whether plugin should prevent TC from setting cursor on this file or that file. I just write functions that open the archive, return its data into TC, etc., but definitely not cursor navigation routines! TC and TC only is responsible for setting the cursor in different situations.
Sir_SiLvA wrote:your cd command works fine as long as you dont install that game-archive-plugin wich steals the *.bar-extension telling tc: "dont treat .bar-files as files anymore - they are now archives you can look into"
thus tc tries to look into the file wich ofc doesnt work as its only a plain text-file.
I don't blame TC for showing me the error message and for not entering the archive. That's absolutely normal and entirely expected behaviour. My report is about setting cursor only, nothing more.
Sir_SiLvA wrote:Without that Plugin your cd-command works fine.
With the plugin it doesnt because tc expects to set the cursor on the ".." INSIDE the default.bar-archive wich doesnt work ofc
And you really think it's normal? If TC did not enter the archive, why should it set the cursor as if it was in archive? I don't get you. If I try to enter some archive I definitely won't be satisfied with its brokenness. I'll try to open it in an external packer, I'll try to view its contents in Lister, I'll try to repair it one way or another. In other words I'm going to do various things with this archive, so setting the cursor on it looks the most logical behaviour in such situation to me.


BTW if you are still insistent in the plugin's guilt, here is a plugin-less example for you:
1. Create a damaged ZIP file (or download this one).
2. Start TC with empty INI.
3. Type cd <path-to-archive>, press Enter.
4. TC shows the message about broken archive.
5. The cursor is located on the [..] element, not on the archive.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 2790
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA » 2011-10-03, 19:54 UTC

Flint wrote:BTW if you are still insistent in the plugin's guilt, here is a plugin-less example for you:
1. Create a damaged ZIP file (or download this one).
2. Start TC with empty INI.
3. Type cd <path-to-archive>, press Enter.
4. TC shows the message about broken archive.
5. The cursor is located on the [..] element, not on the archive.
Yes I am cause i tried it before blaming the Plugin this way - wich works:

take a textfile with just the word test in it and call it test.rar and put it into c:\temp

now use ur tc with a clean/fresh ini and type into cmd-line cd c:\temp\test.rar

cursor is on the file same goes for if u name the file test.zip...

Edit: I take the thing with the zip back only the Rar-File-Case works Zip not strangly...

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-03, 20:07 UTC

Sir_SiLvA wrote:now use ur tc with a clean/fresh ini and type into cmd-line cd c:\temp\test.rar
cursor is on the file
Here the cursor goes on the [..] instead of file. The only exception I could get is when TC already was in C:\temp, then typing cd c:\temp\test.rar did not change cursor position at all, so it could be on the file if I put it on this file just before typing the command, but if it is on a different file it remains there. And if I'm in some other directory (so that dir change occurs) the cursor is on the [..].
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

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

Post by *ghisler(Author) » 2011-10-03, 21:28 UTC

It seems that the StalkerDB plugin detects archives it can handle by content, not by extension. It tells TC that it can handle the .bar file (returns true to CanYouHandleThisFile), but then fails to list contents from it.
Author of Total Commander
http://www.ghisler.com

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-03, 22:10 UTC

ghisler(Author)
You didn't get it. The problem is not in failing to enter the archive, it's that TC does not set cursor on the archive itself.

Please, read the end of my pre-previous message: I posted steps for reproducing the problem without any external plugins.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

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

Post by *ghisler(Author) » 2011-10-03, 22:12 UTC

That wouldn't happen if the plugin would report FALSE to CanYouHandleThisFile. TC expects that the plugin can handle the file, so it stops further processing when that fails.
Author of Total Commander
http://www.ghisler.com

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-03, 22:14 UTC

Christian, please! I said that no plugin is required to reproduce the problem.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

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

Post by *ghisler(Author) » 2011-10-05, 10:09 UTC

Sorry, I don't get it. When I start TC with fresh INI (no plugins) and send command
cd c:\totalcmd\DEFAULT.BAR
then TC goes to c:\totalcmd and puts cursor on file DEFAULT.BAR, no error. So plugins are indeed required to get the error...
Author of Total Commander
http://www.ghisler.com

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-05, 11:34 UTC

ghisler(Author)
Steps to reproduce:

1. Create a damaged ZIP file (or download this one).
2. Start TC with empty INI.
3. Type cd <path-to-archive>, press Enter.
4. TC shows the message about broken archive. This is absolutely normal!
5. The cursor is located on the [..] element, not on the archive. <<-- This is what's I'm complaining about.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 2790
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA » 2011-10-05, 12:55 UTC

Its still a Plugin called Wcmzip32.dll :D because with a defect Rar-Archive it works fine...

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-10-05, 14:31 UTC

Sir_SiLvA
Why confuse matters further?
I said several times that it's not plugin's behaviour what I'm trying to report, but TC's setting cursor at the wrong position.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

Post Reply