Skip to content

Commit 62ad30c

Browse files
authored
Merge pull request #38 from micmacIGN/debug_windowsAP
Correction PIMs2MNT windows
2 parents 0fc16b5 + d5004fe commit 62ad30c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/util/files.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,18 @@ void ELISE_fp::RmFile(const std::string & aFile)
343343

344344
void ELISE_fp::MvFile(const std::string & aName1,const std::string & aDest)
345345
{
346-
std::string aNameCom = std::string(SYS_MV)+ " " + aName1 + " " + aDest;
346+
#if ELISE_windows
347+
string src = aName1;
348+
replace(src.begin(), src.end(), '/', '\\');
349+
string dst = aDest;
350+
replace(dst.begin(), dst.end(), '/', '\\');
351+
std::string aNameCom = std::string(SYS_MV) + " " + src + " " + dst;
352+
#else
353+
std::string aNameCom = std::string(SYS_MV) + " " + aName1 + " " + aDest;
354+
#endif
355+
347356
VoidSystem(aNameCom.c_str());
357+
ELISE_DEBUG_ERROR(!ELISE_fp::exist_file(aDest), "ELISE_fp::MvFile", '[' << aNameCom << "] has not been created");
348358
}
349359

350360
void ELISE_fp::CpFile(const std::string & aName1,const std::string & aDest)

0 commit comments

Comments
 (0)