From 2f45affd6994ad2f5b34454744eb7acef4f36269 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 22 Mar 2017 19:41:01 +0100 Subject: [PATCH] ignore dot files on cleanup --- lam/lib/ldap.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index 558d0bc5..8a948809 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -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); }