ignore dot files on cleanup
This commit is contained in:
parent
0ac6fc6c2e
commit
2f45affd69
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2016 Roland Gruber
|
Copyright (C) 2003 - 2017 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -162,7 +162,7 @@ class Ldap{
|
||||||
$file = @readdir($dir);
|
$file = @readdir($dir);
|
||||||
while ($file) {
|
while ($file) {
|
||||||
$path = $tmpDir . $file;
|
$path = $tmpDir . $file;
|
||||||
if (($file != '.') && ($file != '..') && ($file != '.htaccess') && !is_dir($path)) {
|
if ((substr($file, 0, 1) != '.') && !is_dir($path)) {
|
||||||
if ($time - filemtime($path) > 900) {
|
if ($time - filemtime($path) > 900) {
|
||||||
@unlink($path);
|
@unlink($path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue