Further attempt to self-update
This commit is contained in:
parent
f99c53591f
commit
d2a74d0be0
2 changed files with 7 additions and 10 deletions
|
@ -16,16 +16,13 @@ function delete_directory(string $directoryToDelete)
|
||||||
$filepath = $directoryToDelete . '/' . $filename;
|
$filepath = $directoryToDelete . '/' . $filename;
|
||||||
|
|
||||||
if (is_file($filepath) && !is_dir($filepath)) {
|
if (is_file($filepath) && !is_dir($filepath)) {
|
||||||
echo 'unlink: ' . $filepath . '<br>';
|
unlink($filepath);
|
||||||
// unlink($filepath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_dir($filepath)) {
|
if (is_dir($filepath)) {
|
||||||
echo 'delete_directory: ' . $filepath . '<br>';
|
delete_directory($filepath);
|
||||||
// delete_directory($filepath);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo 'rmdir (final): ' . $filepath . '<br>';
|
rmdir($directoryToDelete);
|
||||||
// rmdir($directoryToDelete);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,14 +106,14 @@ if ($zip->open($zip_filename)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filepath = $directory_wishthis_github . '/' . $filename;
|
$filepath = __DIR__ . '/' . $filename;
|
||||||
|
$filepath_github = $directory_wishthis_github . '/' . $filename;
|
||||||
|
|
||||||
if (is_dir($filepath)) {
|
if (is_dir($filepath) && is_dir($filepath_github)) {
|
||||||
delete_directory($filepath);
|
delete_directory($filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo 'reanme: ' . $filepath . ' to ' . __DIR__ . '/' . $filename . '<br>';
|
rename($filepath_github, $filepath);
|
||||||
// rename($filepath, __DIR__ . '/' . $filename);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue