From: Hongli L. <ho...@te...> - 2001-02-15 15:06:56
|
On Thu, 15 Feb 2001 09:21:14 Giovanni Corriga wrote: > Maybe we can keep this workaround as a rule. I think that handling > extraction directory is a garp-[zip|tar|tgz] issue, not > [zip|tar|tgz]lib's. But if you think otherwise, I think I can add a > tl_extractfiletodir() function to tarlib. The current workaround is by setting the working directory while extracting. But this kind of workaround is not threadsafe. I planned pthread support in some later version of GnomeZip, so I want everything to be more or less threadsafe. Imagine extraction a file to one directory, while using another window (of the same app) to extract some other file to some other directory. Imagine GarpArchive 1 sets the working directory to /foo, then the pthread lib gives the control to GarpArchive 2. GarpArchive 2's chdir() code has already been executed beforem\, so it extracts. But because the working directory has been altered by GarpArchive 1, it would extract to the wrong dir. See the problem? |