From ec152770fe82837a4785b790f860399b3d34329b Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 30 Dec 2004 07:59:46 +0000 Subject: [PATCH] - admin/update : bug when trying to synchronize a particular category (it was deleted...) git-svn-id: http://piwigo.org/svn/trunk@666 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/update.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/update.php b/admin/update.php index 00e37e455..49ab3e313 100644 --- a/admin/update.php +++ b/admin/update.php @@ -142,6 +142,12 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id // retrieve file system sub-directories fulldirs $fs_fulldirs = get_fs_directories($basedir); + // get_fs_directories doesn't include the base directory, so if it's a + // category directory, we need to include it in our array + if (isset($_POST['cat'])) + { + array_push($fs_fulldirs, $basedir); + } $inserts = array(); // new categories are the directories not present yet in the database