diff options
author | Max Kellermann <max@duempel.org> | 2013-06-24 16:17:46 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-06-24 16:17:46 +0200 |
commit | ef48eca9cac875f65622daf500bd702e20d666f3 (patch) | |
tree | 52fe455c347fd0f0ab14b471e2482c17c8aed5e6 /src/ClientFile.cxx | |
parent | 906d2fbadf075b7d8e3a5be7134a9bebb09b7285 (diff) | |
parent | e9e55b08127dc45b4c6045e1f42e34115086a521 (diff) | |
download | mpd-ef48eca9cac875f65622daf500bd702e20d666f3.tar.gz mpd-ef48eca9cac875f65622daf500bd702e20d666f3.tar.xz mpd-ef48eca9cac875f65622daf500bd702e20d666f3.zip |
Merge branch 'master' of git://git.musicpd.org/dk/mpd
Diffstat (limited to 'src/ClientFile.cxx')
-rw-r--r-- | src/ClientFile.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ClientFile.cxx b/src/ClientFile.cxx index ca5acb229..07fa767b0 100644 --- a/src/ClientFile.cxx +++ b/src/ClientFile.cxx @@ -17,10 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "config.h" #include "ClientFile.hxx" #include "Client.hxx" #include "ack.h" #include "io_error.h" +#include "fs/Path.hxx" +#include "fs/FileSystem.hxx" #include <sys/stat.h> #include <sys/types.h> @@ -28,7 +31,7 @@ #include <unistd.h> bool -client_allow_file(const Client *client, const char *path_fs, +client_allow_file(const Client *client, const Path &path_fs, GError **error_r) { #ifdef WIN32 @@ -53,7 +56,7 @@ client_allow_file(const Client *client, const char *path_fs, } struct stat st; - if (stat(path_fs, &st) < 0) { + if (!StatFile(path_fs, st)) { set_error_errno(error_r); return false; } |