File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ RZ_API bool sdb_disk_create(Sdb *s) {
43
43
if (s -> fdump != -1 ) {
44
44
close (s -> fdump );
45
45
}
46
- #if __WINDOWS__ && UNICODE
46
+ #if __WINDOWS__
47
47
wchar_t * wstr = rz_utf8_to_utf16 (str );
48
48
if (wstr ) {
49
49
s -> fdump = _wopen (wstr , O_BINARY | O_RDWR | O_CREAT | O_TRUNC , SDB_MODE );
@@ -91,11 +91,11 @@ RZ_API bool sdb_disk_finish(Sdb *s) {
91
91
reopen = true;
92
92
}
93
93
#if __WINDOWS__
94
- LPTSTR ndump_ = rz_utf8_to_utf16 (s -> ndump );
95
- LPTSTR dir_ = rz_utf8_to_utf16 (s -> dir );
94
+ wchar_t * ndump_ = rz_utf8_to_utf16 (s -> ndump );
95
+ wchar_t * dir_ = rz_utf8_to_utf16 (s -> dir );
96
96
97
- if (MoveFileEx (ndump_ , dir_ , MOVEFILE_REPLACE_EXISTING )) {
98
- // eprintf ("Error 0x%02x\n", GetLastError ());
97
+ if (! MoveFileExW (ndump_ , dir_ , MOVEFILE_REPLACE_EXISTING )) {
98
+ eprintf ("Error 0x%02x\n" , GetLastError ());
99
99
}
100
100
free (ndump_ );
101
101
free (dir_ );
You can’t perform that action at this time.
0 commit comments