Skip to content

Commit

Permalink
FIX Making path names consistent
Browse files Browse the repository at this point in the history
I've changed the variables to use the absolute path as the path is unhelpful for debugging and this is more consistent with the other lines of code below
  • Loading branch information
dhensby committed May 28, 2013
1 parent 80bcf5e commit 295f76e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filesystem/File.php
Expand Up @@ -527,13 +527,13 @@ public function updateFilesystem() {
if(!is_a($this, 'Folder')) {
// Only throw a fatal error if *both* before and after paths don't exist.
if(!file_exists($pathBeforeAbs)) {
throw new Exception("Cannot move $pathBefore to $pathAfter - $pathBefore doesn't exist");
throw new Exception("Cannot move $pathBeforeAbs to $pathAfterAbs - $pathBeforeAbs doesn't exist");
}

// Check that target directory (not the file itself) exists.
// Only check if we're dealing with a file, otherwise the folder will need to be created
if(!file_exists(dirname($pathAfterAbs))) {
throw new Exception("Cannot move $pathBefore to $pathAfter - Directory " . dirname($pathAfter)
throw new Exception("Cannot move $pathBeforeAbs to $pathAfterAbs - Directory " . dirname($pathAfter)
. " doesn't exist");
}
}
Expand Down

0 comments on commit 295f76e

Please sign in to comment.