Skip to content

Commit

Permalink
fix for auto update filenaming
Browse files Browse the repository at this point in the history
  • Loading branch information
bitslip6 committed Jun 13, 2021
1 parent 420d55b commit ff91b6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ function upgrade(\Bitfire\Request $request) {
$success = \TF\tar_extract($dest, $target) ? "success" : "failure";
//unlink($dest);

\TF\file_recurse(WAF_DIR."cache/bitfire-bitfire_{$_GET['ver']}", function ($x) {
\TF\file_recurse(WAF_DIR."cache/bitfire-{$_GET['ver']}", function ($x) {
//print_r($x);
//die("\nhit");
//\TF\dbg($x);
if (is_file($x)) {
$base = basename($x);
$path = dirname($x);
$root = str_replace(WAF_DIR."cache/bitfire-bitfire_{$_GET['ver']}/", "", $x);
$root = str_replace(WAF_DIR."cache/bitfire-{$_GET['ver']}/", "", $x);
echo "base [$base] path [$path] - [" . WAF_DIR . $root . "]\n";
rename($x, WAF_DIR . $root);
}
Expand Down

0 comments on commit ff91b6e

Please sign in to comment.