From 5ed93a9d9e7d35ab680ba763aa0c2e8302ef6b08 Mon Sep 17 00:00:00 2001 From: Jeremie Guichard Date: Fri, 24 Feb 2017 14:06:48 +0700 Subject: Fix "Load/Save to cloudstorage" for non-ASCII user names On Windows that would fail because stat() doesn't deal well with our utf8 strings. Added new subsurface_stat() portability function to replace stat(). Added Windows implementation of subsurface_stat() using wstat(), with conversion to ut16 of the inputed path. Other platform implementations (linux, android) make use of the normal stat(). Added non ASCII test case in TestGitStorage::testGitStorageLocal() Signed-off-by: Jeremie Guichard --- core/android.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/android.cpp') diff --git a/core/android.cpp b/core/android.cpp index bb9dc5cd8..103f18866 100644 --- a/core/android.cpp +++ b/core/android.cpp @@ -176,6 +176,11 @@ int subsurface_access(const char *path, int mode) return access(path, mode); } +int subsurface_stat(const char* path, struct stat* buf) +{ + return stat(path, buf); +} + struct zip *subsurface_zip_open_readonly(const char *path, int flags, int *errorp) { return zip_open(path, flags, errorp); -- cgit v1.2.3-70-g09d2