v0.92, set perms before del & unlink fix

set 0777 perms on the file before deleting
$entry needs to be $backup
This commit is contained in:
Matt Pass
2012-07-24 07:24:45 +01:00
parent 6d23133101
commit e6bc582e16

View File

@@ -1,6 +1,6 @@
<?php
// -----------------------------------------------
// Zip-It! for ICEcoder v0.9.1 by Matt Pass
// Zip-It! for ICEcoder v0.9.2 by Matt Pass
// Will backup requested files/folders in ICEcoder
// -----------------------------------------------
include("../../lib/settings.php");
@@ -46,7 +46,8 @@ Class zipIt {
while (false !== ($backup = readdir($backupsDir))) {
if ($backup != "." && $backup != "..") {
if ((time()-filemtime($zipDir.$backup)) > $keepTime) {
unlink($zipDir.$entry) or DIE("couldn't delete $zipDir$backup<br>");
chmod($zipDir.$backup, 0777);
unlink($zipDir.$backup) or DIE("couldn't delete $zipDir$backup<br>");
}
}
}