* better error message when rename() fails

This commit is contained in:
Jonathan Ernst
2005-01-27 17:30:24 +00:00
committed by Jeremy Newman
parent d35d02a8a8
commit cf870b4499

View File

@@ -74,7 +74,7 @@ class Screenshot {
if(!rename($hFile['tmp_name'], "data/".$this->sDirectory."/originals/".$this->iScreenshotId)) if(!rename($hFile['tmp_name'], "data/".$this->sDirectory."/originals/".$this->iScreenshotId))
{ {
// whoops, moving failed, do something // whoops, moving failed, do something
addmsg("Unable to move screenshot", "red"); addmsg("Unable to move screenshot from ".$hFile['tmp_name']." to data/".$this->sDirectory."/originals/".$this->iScreenshotId, "red");
$sQuery = "DELETE FROM ".$this->sTable." WHERE ".$this->sTableId." = '".$this->iScreenshotId."'"; $sQuery = "DELETE FROM ".$this->sTable." WHERE ".$this->sTableId." = '".$this->iScreenshotId."'";
query_appdb($sQuery); query_appdb($sQuery);
return false; return false;