mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 11:14:12 +02:00
Fix issue processwire/processwire-issues#600 where label saved to log was showing wrong path
This commit is contained in:
@@ -249,7 +249,6 @@ class WireTempDir extends Wire {
|
|||||||
if(!is_int($maxAge)) $maxAge = $this->tempDirMaxAge;
|
if(!is_int($maxAge)) $maxAge = $this->tempDirMaxAge;
|
||||||
|
|
||||||
$numSubdirs = 0;
|
$numSubdirs = 0;
|
||||||
$pathname = '';
|
|
||||||
$oldestAllowedFileTime = time() - $maxAge;
|
$oldestAllowedFileTime = time() - $maxAge;
|
||||||
$success = true;
|
$success = true;
|
||||||
|
|
||||||
@@ -275,7 +274,7 @@ class WireTempDir extends Wire {
|
|||||||
|
|
||||||
if($removeDir) {
|
if($removeDir) {
|
||||||
if(!$this->rmdir($pathname, true)) {
|
if(!$this->rmdir($pathname, true)) {
|
||||||
$this->log("Unable to remove: $path");
|
$this->log("Unable to remove: $pathname");
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -288,7 +287,7 @@ class WireTempDir extends Wire {
|
|||||||
if($this->rmdir($path, true)) {
|
if($this->rmdir($path, true)) {
|
||||||
$success = true;
|
$success = true;
|
||||||
} else {
|
} else {
|
||||||
$this->log("Unable to remove: $pathname");
|
$this->log("Unable to remove: $path");
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -356,6 +355,7 @@ class WireTempDir extends Wire {
|
|||||||
if($this->wire('files')->mkdir($dir, $recursive)) {
|
if($this->wire('files')->mkdir($dir, $recursive)) {
|
||||||
$dir = rtrim($dir, "/\\") . DIRECTORY_SEPARATOR;
|
$dir = rtrim($dir, "/\\") . DIRECTORY_SEPARATOR;
|
||||||
file_put_contents($dir . self::hiddenFileName, time());
|
file_put_contents($dir . self::hiddenFileName, time());
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user