diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-21 05:03:26 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-21 05:03:26 +0000 |
commit | bc864536c8f8fef6e611f17c063e77e54186e622 (patch) | |
tree | 5babc78a722c5e03ee90ed184223c7f330ab23ac /etc | |
parent | 61deccba103c44672c8e9f39ca61abc6cdf69c50 (diff) | |
download | pfsense-bc864536c8f8fef6e611f17c063e77e54186e622.zip pfsense-bc864536c8f8fef6e611f17c063e77e54186e622.tar.gz |
don't attempt to unlink directories
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index a3fd7ed..d8257c7 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -290,7 +290,7 @@ function unlink_if_exists($fn) { $to_do = glob($fn); if(is_array($to_do)) { foreach($to_do as $filename) - if (file_exists($filename)) unlink($filename); + if (file_exists($filename) && !is_dir($filename)) unlink($filename); } else { if (file_exists($fn)) unlink($fn); } |