File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -369,10 +369,16 @@ function getEventDefaultVideoPath($event) {
369369
370370function deletePath ( $ path ) {
371371 ZM \Debug ('Deleting ' .$ path );
372- if ( is_dir ($ path ) ) {
373- system (escapeshellcmd ('rm -rf ' .$ path ));
374- } else if ( file_exists ($ path ) ) {
375- unlink ($ path );
372+ if (is_link ($ path )) {
373+ if (!unlink ($ path )) ZM \Debug ("Failed to unlink $ path " );
374+ } else if (is_dir ($ path )) {
375+ if (false === ($ output = system ('rm -rf " ' .escapeshellcmd ($ path ).'" ' ))) {
376+ ZM \Warning ('Failed doing rm -rf " ' .escapeshellcmd ($ path ).'" ' );
377+ }
378+ } else if (file_exists ($ path )) {
379+ if (!unlink ($ path )) ZM \Debug ("Failed to delete $ path " );
380+ } else {
381+ ZM \Warning ("Path $ path does not exist in deletePath() " );
376382 }
377383}
378384
You can’t perform that action at this time.
0 commit comments