]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/os-windows.hpp
Fix image save on Windows
[factor.git] / vm / os-windows.hpp
index 0569d85b61e30bdf6b9a26f8c921e9fe8cff8388..30e3eea9c975b8933501318e10bc773f655d9e1e 100755 (executable)
@@ -39,10 +39,10 @@ typedef wchar_t vm_char;
 
 #define OPEN_READ(path) _wfopen((path),L"rb")
 #define OPEN_WRITE(path) _wfopen((path),L"wb")
-#define MOVE_FILE(path1,path2) \
+#define MOVE_FILE(path1,path2)\
 do {\
-       if(MoveFile((path1),(path2)) == 0)\
-               general_error(ERROR_IO,tag_fixnum(GetLastError()),false_object,NULL);\
+       if(MoveFileEx((path1),(path2),MOVEFILE_REPLACE_EXISTING) == false)\
+               std::cout << "MoveFile() failed: error " << GetLastError() << std::endl;\
 } while(0)
 
 /* Difference between Jan 1 00:00:00 1601 and Jan 1 00:00:00 1970 */