Update tests for fsetFolder

This commit is contained in:
2026-06-25 16:26:15 +09:00
parent 7e01886ad8
commit d66fce374c
3 changed files with 61 additions and 37 deletions
+4 -4
View File
@@ -32,11 +32,11 @@ class FileWriter
if (!is_writeable($folder)) {
return false;
}
// if last is not / then add
if (substr($folder, -1, 1) != DIRECTORY_SEPARATOR) {
$folder .= DIRECTORY_SEPARATOR;
if (!is_dir($folder)) {
return false;
}
self::$debug_folder = $folder;
// if last is not / then add
self::$debug_folder = rtrim($folder, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
return true;
}