diff options
author | Colin Smith <colin@pfsense.org> | 2005-07-16 02:39:44 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-07-16 02:39:44 +0000 |
commit | 9ff926a2dcefcdc4bd26ee8b5bc756013b7f5fc3 (patch) | |
tree | 2ceebc7bdcc023e0b5cd5035573a4097fa294a0a /etc/inc | |
parent | cebc42e6fb4a94098053e07e2fca441edc69aab2 (diff) | |
download | pfsense-9ff926a2dcefcdc4bd26ee8b5bc756013b7f5fc3.zip pfsense-9ff926a2dcefcdc4bd26ee8b5bc756013b7f5fc3.tar.gz |
Instead of calling two functions before unlinking, just use @unlink().
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/util.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 58f13b3..c41d824 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -288,9 +288,9 @@ function unlink_if_exists($fn) { $to_do = glob($fn); if(is_array($to_do)) { foreach($to_do as $filename) - if (file_exists($filename) && !is_dir($filename)) unlink($filename); + @unlink($filename); } else { - if (file_exists($fn)) unlink($fn); + @unlink($fn); } } |