mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] moving Utils to 'platform_win' folder and refactoring
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "utils.h"
|
||||
#include "platform_win/utils.h"
|
||||
#include "version.h"
|
||||
#include <Windows.h>
|
||||
#include <shellapi.h>
|
||||
@ -52,6 +52,7 @@
|
||||
|
||||
#define BUFSIZE 1024
|
||||
|
||||
|
||||
namespace NS_Utils
|
||||
{
|
||||
wstring GetLastErrorAsString()
|
||||
@ -260,8 +261,8 @@ namespace NS_File
|
||||
|
||||
bool replaceFile(const wstring &oldFilePath, const wstring &newFilePath)
|
||||
{
|
||||
return MoveFileExW(oldFilePath.c_str(), newFilePath.c_str(),
|
||||
MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH) != 0 ? true : false;
|
||||
return MoveFileEx(oldFilePath.c_str(), newFilePath.c_str(), MOVEFILE_REPLACE_EXISTING |
|
||||
MOVEFILE_WRITE_THROUGH | MOVEFILE_COPY_ALLOWED) != 0 ? true : false;
|
||||
}
|
||||
|
||||
bool replaceFolder(const wstring &from, const wstring &to, bool remove_existing)
|
||||
Reference in New Issue
Block a user