diff options
-rwxr-xr-x | docs/CHANGELOG | 5 | ||||
-rw-r--r-- | lib/class/catalog.class.php | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 2379d56c..f2ef51fd 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -3,6 +3,11 @@ -------------------------------------------------------------------------- -------------------------------------------------------------------------- + v.3.6-future + - Fixed an issue with adding catalogs on Windows caused by inconsistent + behaviour of is_readable() (reported by Lockzi) + +-------------------------------------------------------------------------- v.3.6-Alpha3 2012-10-15 - Updated getID3 to 1.9.4b1 - Removed support for extremely old passwords diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 4dc46c53..9057547b 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -275,9 +275,13 @@ class Catalog extends database_object { $path = Dba::escape($data['path']); // Make sure the path is readable/exists - if (!is_readable($data['path']) AND $data['type'] == 'local') { - Error::add('general', sprintf(T_('Error: %s is not readable or does not exist'), scrub_out($data['path']))); - return false; + if ($data['type'] == 'local') { + $handle = opendir($path); + if ($handle === false) { + Error::add('general', sprintf(T_('Error: %s is not readable or does not exist'), scrub_out($data['path']))); + return false; + } + closedir($handle); } // Make sure this path isn't already in use by an existing catalog |