strange problem when tar-ing a file in obsd

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
I made a script that tars a handful of directories into a tar.gz file. the strange thing is, when i use winzip on windows to unzip that file there are a few files whose path is not preserved. is there a way to ensure that path is strictly enforced when tarring the directories?

ie when i tar the dir the structure is
/files/subdir1
/files/subdir2
/files/subdir1/filename.txt
/files/subdir2/otherfile

and when i unzip the tar.gz the stucture is something like
/files/subdir1
/files/subdir2
/files/subdir1/filename.txt
/files/otherfile

it seems strange that only one file and one directory have messed up paths when i unzip the file, the rest or the files and paths are just fine.

in any case, i'm installing zip from ports now so hopefully i can get around this problem by using it, but i shouldn't have to. it seemed a curious error and i wondered if it was a problem with tar or winzip not being able to read a tar file properly.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
I would be more likely to blame winzip, and not just because of my hatred for Windows based software ;)

Try untarring the same file in a different spot on your OpenBSD machine, see if the error still exists. If it doesnt, its most likely winzip. You could also load cygwin on your Windows machine and use tar to untar the files.
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
yeah i installed the zip port and it works just fine. I think its a problem with winzip cuz my machine can untar the files elsewhere ok (as i knew it would) oh well:)