Skip to content

Commit 04f4045

Browse files
committed
fix move command on windows
1 parent dfcd72e commit 04f4045

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ To install or update LODA, please follow the [installation instructions](https:/
22

33
## [Unreleased]
44

5+
### v25.8.30
6+
57
### Bugfixes
68

9+
* Fix `move` command on Windows
710
* Fix optimizer bug
811

912
## v25.8.28

src/sys/file.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ bool execCmd(const std::string &cmd, bool fail_on_error) {
100100
}
101101

102102
void moveFile(const std::string &from, const std::string &to) {
103-
execCmd("mv \"" + from + "\" \"" + to + "\"");
103+
#ifdef _WIN64
104+
std::string cmd = "move";
105+
#else
106+
std::string cmd = "mv";
107+
#endif
108+
execCmd(cmd + " \"" + from + "\" \"" + to + "\"");
104109
}
105110

106111
void moveDirToParent(const std::string &path, const std::string &dir,

0 commit comments

Comments
 (0)