Wrong permission checking on file save.

This commit is contained in:
Thomas Tanghus 2012-01-04 23:31:32 +01:00
Родитель 48a8f2a793
Коммит d80b477ab5
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -143,10 +143,10 @@ class OC_Image {
$filepath = null; // Just being cautious ;-)
} else {
if(!is_writable(dirname($filepath))) {
OC_Log::write('core','OC_Image::save. Directory \''.dirname($filepath).'\' is not writable.', OC_Log::ERROR);
OC_Log::write('core','OC_Image::_output. Directory \''.dirname($filepath).'\' is not writable.', OC_Log::ERROR);
return false;
} elseif(is_writable(dirname($filepath)) && !is_writable($filepath)) {
OC_Log::write('core','OC_Image::save. File \''.$filepath.'\' is not writable.', OC_Log::ERROR);
} elseif(is_writable(dirname($filepath)) && file_exists($filepath) && !is_writable($filepath)) {
OC_Log::write('core','OC_Image::_output. File \''.$filepath.'\' is not writable.', OC_Log::ERROR);
return false;
}
}