Delete archive contents on samba share cripples file name

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

Moderators: sheep, Hacker, Stefan2, white

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Delete archive contents on samba share cripples file name

Post by *StatusQuo »

When deleting files from an archive with a long filename (not standard 8.3) that is placed on a samba share, the name of the archive is renamed to its 8.3-representative.
I.e. "test_without_spaces.rar" is renamed to "tmczuf~8.rar".

Adding new files to the archive works correct without side-effects, just deletion of some file contents cause the name to change.
This applies to archive formats NOT handled internally.
OK: - ZIP, TAR, TGZ (GZ via local temp-dir)
Content deletion forced the archive to be renamed with: - RAR, ARJ, UC2, LHA (*.lzh; deletion of this archive content failed, archive name was changed/crippled anyway)

With TC7 rc3, also with empty/new INI: always the same problem.
With WinRar directly: no problem, deleting files from the same archive leaves the filename untouched as it is.

The corresponding settings (=> name mangling) in samba.conf are:

Code: Select all

[global]
    mangle case = no
    preserve case = no
    short preserve case = no
    mangling method  = hash2
Not set and therefore standard should be:

Code: Select all

    case sensitive (casesignames) = no
    default case = lower
    mangled names = yes
    mangling char = ~
    mangled stack = 50
    mangled map =  
Collected test results (all archives, original and with changed names):
(download link)

Any ideas, what could be going on here?

[Edit:] Or someone who can reproduce this?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

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

Post by *ghisler(Author) »

That's a known bug of Sambe drives: When you manipulate a file by its short DOS name, then the long name is lost.

Do you use RAR.EXE or Winrar.exe in Total Commander?
Author of Total Commander
http://www.ghisler.com

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Many thanks for the hint.
I will check that (tomorrow I hope, I'm not at the server right now). I think Winrar.exe is used, but I would not swear. :-)
I'll also try Flint's testRAR.exe to see what the parameters are.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

I checked it: WinRar.exe is used.
To delete a file from the archive on network drive X:, the parameters are (according to testRAR.exe):

Code: Select all

argv[0] == 'd:\[path]\WinRar.exe'
argv[1] == 'd'
argv[2] == '-c-'
argv[3] == 'X:\tmp\__test\TOPOBQ~E.RAR'
argv[4] == '@C:\TEMP\CMD42.tmp'
Indeed the short DOS name seems to be used here.

My first idea was to use a batch file to translate short names to their LFNs, but unfortunately found no function in this direction yet.
Is there something I (or TCs next RC) can do to avoid this?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

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

Post by *ghisler(Author) »

No, you can't do anything. I will check why I made this conversion, probably because of older RAR versions which had problems with spaces in names. I think that I can change that now.
Author of Total Commander
http://www.ghisler.com

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

That would be nice, thanks.
I found a workaround until then: using the network share directly (\\server\share\) instead of its assigned drive letter seems to work, the filename stays intact then.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

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

Post by *ghisler(Author) »

Should be fixed now in RC4, please test!
Author of Total Commander
http://www.ghisler.com

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Fixed in TC7rc4. :)

RAR handling on Samba now works correct both using UNC-path or drive letter to access the archive.

The other external packers are unchanged -
but since my versions of ARJ, UC2, LHA, LZH packers don't support LFNs,
this can't be fixed in TC - Samba is the bad guy here... ;)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

User avatar
Hacker
Moderator
Moderator
Posts: 11733
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

but since my versions of ARJ
You should upgrade your versions. ;)

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.

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Hacker wrote:You should upgrade your versions. ;)
Yes, I should. :)
Those packers are here just for testing, until forced otherwise.
But I'll drop myself a note, maybe something can be improved in how TC handles them, too...
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

StatusQuo wrote:but since my versions of ARJ, UC2, LHA, LZH packers don't support LFNs,
I've tested ARJ32 v3.14a, this works OK, too.

I could also test WinAce 2.61. This has a similar problem.
Passing long file names could help here to not loose the LFNs.

But this may not make much sense, since Winace in this version
is not LFN-capable on our Samba server at all (neither via drive letter, nor UNC path).

While trying to delete a single file out of an ACE archive it
- deletes the whole archive file from the disk
- pops up an alert, that "Archive can not be saved" and
- asks to enter another directory
If this dialog is canceled by the user, the archive is gone.

For UC2 and LHA/LZH I found no newer versions (didn't expect to), maybe I'll try some thirdparty tools sometime.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!

Post Reply