diff options
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/ProxyDatabasePlugin.cxx | 1 | ||||
-rw-r--r-- | src/db/SimpleDatabasePlugin.cxx | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 00b5d445f..a4fa88edd 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -22,7 +22,6 @@ #include "DatabasePlugin.hxx" #include "DatabaseSelection.hxx" #include "DatabaseError.hxx" -#include "PlaylistVector.hxx" #include "Directory.hxx" #include "Song.hxx" #include "SongFilter.hxx" diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx index e7ea7a62d..7fc66ed67 100644 --- a/src/db/SimpleDatabasePlugin.cxx +++ b/src/db/SimpleDatabasePlugin.cxx @@ -26,14 +26,13 @@ #include "DatabaseSave.hxx" #include "DatabaseLock.hxx" #include "DatabaseError.hxx" -#include "TextFile.hxx" +#include "fs/TextFile.hxx" #include "ConfigData.hxx" #include "fs/FileSystem.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "Log.hxx" -#include <sys/types.h> #include <errno.h> static constexpr Domain simple_db_domain("simple_db"); @@ -72,7 +71,7 @@ SimpleDatabase::Check(Error &error) const assert(!path.IsNull()); /* Check if the file exists */ - if (!CheckAccess(path, F_OK)) { + if (!CheckAccess(path)) { /* If the file doesn't exist, we can't check if we can write * it, so we are going to try to get the directory path, and * see if we can write a file in that */ @@ -95,6 +94,7 @@ SimpleDatabase::Check(Error &error) const return false; } +#ifndef WIN32 /* Check if we can write to the directory */ if (!CheckAccess(dirPath, X_OK | W_OK)) { const int e = errno; @@ -103,7 +103,7 @@ SimpleDatabase::Check(Error &error) const dirPath_utf8.c_str()); return false; } - +#endif return true; } @@ -122,12 +122,14 @@ SimpleDatabase::Check(Error &error) const return false; } +#ifndef WIN32 /* And check that we can write to it */ if (!CheckAccess(path, R_OK | W_OK)) { error.FormatErrno("Can't open db file \"%s\" for reading/writing", path_utf8.c_str()); return false; } +#endif return true; } |