Fixes the restore of unicode directories in Windows.

This commit is contained in:
Andrea Mazzoleni 2011-05-24 20:10:10 +02:00
parent be06a6284d
commit 58f191ef1f
3 changed files with 15 additions and 1 deletions

View file

@ -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

View file

@ -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;

View file

@ -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.