dblayer : sqlite : chmod 0666 only if the file exists

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2098 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-04-29 11:28:56 +00:00
parent d64f1f035e
commit 4cd06da7da

View File

@@ -113,6 +113,7 @@ class dblayer extends PDO
"The SQLite database file is write protected"),
500);
if (function_exists ("posix_getuid") &&
file_exists ($file) &&
fileowner ($file) === posix_getuid ())
chmod ($file, 0666);
try