1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00

Fix issue processwire/processwire-issues#600 where label saved to log was showing wrong path

This commit is contained in:
Ryan Cramer
2018-05-21 09:45:24 -04:00
parent 771c275432
commit af3db8b5c1

View File

@@ -249,7 +249,6 @@ class WireTempDir extends Wire {
if(!is_int($maxAge)) $maxAge = $this->tempDirMaxAge;
$numSubdirs = 0;
$pathname = '';
$oldestAllowedFileTime = time() - $maxAge;
$success = true;
@@ -275,7 +274,7 @@ class WireTempDir extends Wire {
if($removeDir) {
if(!$this->rmdir($pathname, true)) {
$this->log("Unable to remove: $path");
$this->log("Unable to remove: $pathname");
$success = false;
}
} else {
@@ -288,7 +287,7 @@ class WireTempDir extends Wire {
if($this->rmdir($path, true)) {
$success = true;
} else {
$this->log("Unable to remove: $pathname");
$this->log("Unable to remove: $path");
$success = false;
}
}
@@ -356,6 +355,7 @@ class WireTempDir extends Wire {
if($this->wire('files')->mkdir($dir, $recursive)) {
$dir = rtrim($dir, "/\\") . DIRECTORY_SEPARATOR;
file_put_contents($dir . self::hiddenFileName, time());
return true;
} else {
return false;
}