subfolders contained in rar sometimes unraring improperly

Post Reply
slotboxed
Posts: 57
Joined: Sun Nov 09, 2003 3:49 am

subfolders contained in rar sometimes unraring improperly

Post by slotboxed »

I don't know what is causing this, but oftentimes when a rar contains subfolders inside of it, the unrar process does not put any files inside those subfolders. I think in these cases, UE extracts everything into the Unrar folder first, and then at the end creates the empty subfolder(s) inside the Unrar folder it should have extracted the files into.

I hope I have explained this sufficiently. Most recently it happened to me on a dvd where it extracted the VOBs, IFOs and BUPs, and then created the VIDEO_TS folder last.

I think possibly these are rars not created with WinRAR, but instead with Linux rar utility or something, because I know that the folders are listed last in rars when they are created on Linux.
alex
Posts: 4558
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

unlike par2 repair where i rewrote everything for unrar i'm just using unrar code with only superficial changes.

i didn't enter too much into the details of the unrar format (mostly what interested me was error handling and crashes within the code), but it would be logical to presume the full relative file path is included with every file and it is created when the file is extracted to the disk.

does winrar unrars ok?

if yes, if you unrar with this command line utility do you see folders as well:

http://www.rarlab.com/rar/unrarw32.exe

if the unrar command line works i will compile unrar.exe from the earlier unrar code i'm using, so we could check if it works as well, if not i'll incorporate the newer unrar code (i have the list of changes i've made, so it is not very complicated).
alex
Posts: 4558
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

it appears my initial assumption is correct.

i've rared several small files, then put them into a folder and rared them again.

then i looked for the files name in a binary editor.

there is the full path with every file.

logically it is unlikely someone would define folders separatedly.

but try to reverify it with winrar / unrar command line, if winrar ask for duplicate file name it means different files with the same name were packed into the same rar (which is not impossible from the point of the rar file format specification).

i also added two files into rar and then changed name of the second one to the first one so we have two identical files, winrar complained about corrupt header (wrong checksum), but it proceeded, then it asked for overwrite, so two identical file names are possible.

as to linux though try to check the case (open the rar file in winrar or you can look for the names in binary editor), in linux file names are case sensitive.

btw for this case UE has an option for unrar to do autorename, edit menu->properties->save/unpack, unrar, duplicate file names, auto-rename.
slotboxed
Posts: 57
Joined: Sun Nov 09, 2003 3:49 am

Post by slotboxed »

Okay, I will try it with the windows cli next time it occurs. I am assuming you use the x command, not the e command. I always use "unrar x file.rar" on Linux.

Maybe that is what is wrong:
UNRAR 3.80 freeware Copyright (c) 1993-2008 Alexander Roshal

Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>

<Commands>
e Extract files to current directory
l[t,b] List archive [technical, bare]
p Print file to stdout
t Test archive files
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path
alex
Posts: 4558
Joined: Thu Feb 27, 2003 5:57 pm

Post by alex »

yes, of course with the full path, if not someone would already noticed.

just in the rar the path appears to be prepended to the file name in the rar headers, i don't think there are other options

try to uncheck "auto unrar" in edit menu->properties->save/unpack, unpack, auto. then open the file in winrar and check what is with the names, if the case is the same or not, then extract with winrar to check if it will ask for overwrite. if it will extract differently, then we'll check it further.

also some files have recursive rar files containing files with the same name, but UE doesn't keep unraring nested rars.
Post Reply