WebPagetest Forums

Full Version: Deletion of directory "results"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I run a server only as a relay test server and the "results" directory is empty, then the "delete.php" script, not only removes the "relay" subdirectory and its contents but also removes the "results" directory. To prevent this I did the above change in the "delete.php":

Original code:

// delete empty directories above this one
do {
$testPath = rtrim($testPath, "/\\");
$testPath = dirname($testPath);
rmdir($testPath);
} while( strpos($testPath, 'relay') );


changed to:

// delete empty directories above this one
while(strpos($testPath, 'relay')) {
$testPath = rtrim($testPath, "/\\");
$testPath = dirname($testPath);
rmdir($testPath);
}
Thanks, just pushed your change. Should be in the next release: https://github.com/WPO-Foundation/webpag...57847c01c7
Reference URL's