diff options
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; } |