Extracting locks folder


Extracting locks folder

Postby andrew on Wed Mar 27, 2002 1:54 pm

Hello,

EasyZip seems to be working fine, but after a (successfull) unzip the directory where the extraction took place is looked and can"t be renamed nor deleted via Scripting Host, ASP or File-Explorer; File-Explorer-Error-Message: Access violation...
The folowing script works inside an ASP-page.

set myZip = server.createobject("aspZip.EasyZIP")
myZip.ZipFileName = "c: emp est.zip"
myZip.ArgsClear
myZip.ArgsAdd("*.*")
myZip.UnZip
Set myZip=nothing

After its run the only way to "relock" the directory is to restart the webserver service!

Any idea? Thanks for any help
Andreas
andrew
 
Posts: 1
Joined: Wed Mar 27, 2002 1:45 pm

Postby John on Wed Mar 27, 2002 5:15 pm

I've run some test and the only way to lock the directory was executing the script that you are using it on the same directory that it was the zip file.
This is normal as the IIS block the directory, not the aspEasyZIP, this is why you get it unlock when you restart the IIS service.

Try executing your script on a different directory.
On my test there were no problems to delete the directory on the IIS 5.0 and win2k PRO.

John Lohmeyer
MITData.com
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain

Postby jcarlile on Fri Jun 21, 2002 4:26 pm

Hello!


** cut ***************

2 minutes after posting this text I found a possible solution to my problem.
I guess that setting the RootDir property before calling the Unzip method causes IIS to show the behavior below. IIS doesn't lock the folder if this property remains unset.
I don't know if it's just accidentially or by intention.
But sorry for bothering you!
Bye!

** cut ***************


We are currently evaluating easyZip in a web-based project where we need to upload and extract zipped data. EasyZip is used in ASP on IIS 5.0 running on a Win2k Server machine.

I created the following directory structure (sorry for these dashes, but blanks were stripped)

--Import
-----upload
-------zip1.zip
-------zip2.zip
----unzipped
----------dir1
-------------files from zip1.zip
----------dir2
-------------files from zip2.zip

My first ASP-file receives a zip file from the client's browser an stores it in the upload-directory.
The second ASP-script has to extract the zip file and store it's content to a certain directory which has the same name as the zip file (w/o extension).
The script
1. checks whether the directory already exists and deletes it
2. creates an empty folder
3. easyZip extracts the content of the zip file

The problem, that Win2k throws an Access-Denied-Error as soon as I try to execute this procedure a second time with the zip file and the same target directory. I can't remove the folder in the Explorer either. Only restarting the IIS-process helps. I guess it's somehow similar to the topic above.

The code is as following:
<pre id=code><font face=courier size=2 id=code>
' * create easyZIP object
set oZIP = Server.createObject( "aspZIP.easyZIP" )

' * 1. check directory
set oFS = Server.createObject( "Scripting.FileSystemObject" )
if oFS.FolderExists( "unzippeddir1" ) then
oFS.deleteFolder( "unzippeddir1" )
end if

' * 2. create folder
oFS.createFolder( "unzippeddir1" )

' * 3. unzip file
oZIP.ZipFileName = "uploadzip1.zip"
oZIP.ExtrOptions = 1 + 2 '1=use paths, 2=overwrite
oZIP.ArgsAdd( "*.*" )

oZIP.ExtrBaseDir = "unzippeddir1"
oZIP.RootDir = "unzippeddir1"

oZIP.unZIP

if oZIP.Error <> 0 then
set oZIP = nothing
set oFS = nothing
Response.write( "step2_unpack: failed to unpack data (" & oZIP.error & ": " & oZIP.lastMessage & ")" )
Response.end
end if

set oZIP = nothing
</font id=code></pre id=code>

Thanks for helping us in advance and have a nice weekend!

Best Regards,
Matthias Lehneis




Edited by - jcarlile on 06/21/2002 16:46:06
jcarlile
 
Posts: 1
Joined: Fri Jun 21, 2002 3:59 pm
Location: Germany

Postby John on Tue Jun 25, 2002 3:19 pm

Yes, you're right. This is a known bug a you help me to find which was the error [;-)]. As you say the problem comes when setting the rootdir property, it what it does the program is to set the actual directory to the rootdir and unpack from there. When destroying the component it does not restore the actual dir, here is the flow.
It has been fixed on beta 3.0 to be released next month.

John Lohmeyer
MITData.com
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain


Return to Zip

Who is online

Users browsing this forum: No registered users and 2 guests

cron

Fatal error: Not able to open ./cache/data_global.php in D:\Hosting\6480136\html\ForosBB3\includes\acm\acm_file.php on line 106