Hello,
I'm using SimpleZip to backup all my files/folders in a directory. I'm using the following code that working fine:
find( sub { eval {$zip->add($_, Name => $File::Find::name) or warn "Cannot add '$_' to zip file: $SimpleZipError\n" ;}; warn $@ if $@ }, $data);
The problem is as follow, this is how I understand it: When Find go through the folder it create the first pass for all files, then adding the files one by one in the Zip file. We have large files that will take time to be added to the Zip file, if during time the large file is getting add to the zip file, one of the temporary file get remove by another process, when it's time to add this remove file to the zip, all other files will failed. then I'm getting the following error:
Example:
Cannot add 'File1' to zip file: File 'File_that_Was_Remove' does not exist
Cannot add 'File2' to zip file: File 'File_that_Was_Remove' does not exist
Cannot add 'File3' to zip file: File 'File_that_Was_Remove' does not exist
It's like if the $_ value is correct but it report the error that it cannot find the file $File::Find::name (stuck on the file that was removed), then the script end. Only the files from the FIND order was added up to the file that was removed.
Hope that make sense.
I would like to skip the deleted file in the FIND order when it try to add the deleted file in the SimpleZip.
Thanks,
Alex
In reply to SimpleZip If file doesn't exist by AlexandreG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |