// Fix write permissions verification on class_index #PSFV-598

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13889 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-03-06 14:02:48 +00:00
parent 6d454d05ce
commit f9cb438f88
+3 -3
View File
@@ -133,7 +133,9 @@ class Autoload
// Write classes index on disc to cache it
$filename = $this->root_dir.Autoload::INDEX_FILE;
if ((file_exists($filename) && is_writable($filename)) || is_writable(dirname($filename)))
if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename)))
throw new PrestaShopException($filename.' is not writable, please give write permissions (chmod 666) on this file.');
else
{
// Let's write index content in cache file
// In order to be sure that this file is correctly written, a check is done on the file content
@@ -157,8 +159,6 @@ class Autoload
throw new PrestaShopException('Your file '.$filename.' is corrupted. Please remove this file, a new one will be regenerated automatically');
}
}
else
throw new PrestaShopException($filename.' is not writable!');
$this->index = $classes;
}