mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Correct logic when processing directory of files.
This commit is contained in:
1 parent
45790cfd48
commit
ade450f765
1 file changed
+2
-4
+2
-4
@@ -112,10 +112,8 @@ class Tools {
|
||||
}
|
||||
if ($handle = opendir($dir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != "." && $file != ".." && substr($file,-4) != '.ics') {
|
||||
continue;
|
||||
}
|
||||
if(!is_readable($dir.'/'.$file)){
|
||||
if ($file == "." || $file == ".." || substr($file,-4) != '.ics') continue;
|
||||
if ( !is_readable($dir.'/'.$file) ) {
|
||||
dbg_error_log( "importFromDirectory", "ics file '%s' is not readable",$dir .'/'.$file);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user