diff --git a/HISTORY b/HISTORY index 016f0fe7..5266e09b 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,10 @@ SnapRAID HISTORY ================ +1.3 2011/5 +========== +* Fixed the restore of directory with unicode chars in Windows. + 1.2 2011/5 ========== * Fixed use of file names out of the codepage in Windows. All the names diff --git a/mingw.c b/mingw.c index 6d889ab3..a91c87a7 100644 --- a/mingw.c +++ b/mingw.c @@ -236,6 +236,11 @@ int windows_access(const char* file, int mode) return _waccess(u8tou16(file), mode); } +int windows_mkdir(const char* file) +{ + return _wmkdir(u8tou16(file)); +} + int stat_inode(const char* file, struct windows_stat* st) { BY_HANDLE_FILE_INFORMATION info; diff --git a/mingw.h b/mingw.h index 8029bf18..8dce156b 100644 --- a/mingw.h +++ b/mingw.h @@ -41,7 +41,7 @@ #define HAVE_FSYNC 1 #define fsync _commit #define rename windows_rename -#define mkdir(a, b) mkdir(a) +#define mkdir(a, b) windows_mkdir(a) #define dirent windows_dirent #define DIR windows_dir #define opendir windows_opendir @@ -74,6 +74,11 @@ int windows_stat(const char* file, struct windows_stat* st); */ int windows_access(const char* file, int mode); +/** + * Like the C mkdir(). + */ +int windows_mkdir(const char* file); + /** * Like the C stat() with inode information. * It doesn't work for all kind of files and directories. For example "\System Volume Information" cannot be opened.