ignore dot files on cleanup

This commit is contained in:
Roland Gruber 2017-03-22 19:41:01 +01:00
parent 0ac6fc6c2e
commit 2f45affd69
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
$Id$
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
it under the terms of the GNU General Public License as published by
@ -162,7 +162,7 @@ class Ldap{
$file = @readdir($dir);
while ($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) {
@unlink($path);
}