Bug when using: ziponfly relativefilename tmpfolder

Enhanced frontend add-on to queue files.
Post Reply
Bogdan
Posts: 12
Joined: Wed Oct 14, 2009 10:56 pm

Bug when using: ziponfly relativefilename tmpfolder

Post by Bogdan »

When "relativefilename=true", and "ziponfly=zip" file (with parent folder) is compressed in a temp folder because "tmpfolder=javatmpdir", then on the server side "relativefilename" will contain incorrect rel. path (like ".STC\LOCALS~1\Temp\"), which is "javatmpdir" minus the length of the original parent folder path.

Example:
- "javatmpdir" = "C:\DOC~\.STC\LOCALS~1\Temp\"
- Added folder "C:\Temp\SomeFolder" that contains file A.txt
- Relative path should be "SomeFolder\A.txt"
- "A.txt" is compressed into "C:\DOC~\.STC\LOCALS~1\Temp\A.txt.zip"
- Applet constructs the relative file name by cutting N chars from the beginning of the full path, - where N is length of "C:\Temp\"
- but the trick is that the full path is now "C:\DOC~\.STC\LOCALS~1\Temp\A.txt.zip"
- so "relativefilename" becomes ".STC\LOCALS~1\Temp\A.txt.zip"

Anyway, I have the fix already, so if you'd like, see the attachment (the key is "OrigRootDir"):

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Bug when using: ziponfly relativefilename tmpfolder

Post by support »

Thanks, we will have a look into.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Bug when using: ziponfly relativefilename tmpfolder

Post by support »

A workaround would be not use "tmpfolder=javatmpdir".

Post Reply