소스 검색

Merge pull request #362 from christopherreed/fix-linux-dir-copying

[Linux] - remove destination file or directory before copying to it.
Ivan Safrin 12 년 전
부모
커밋
f3f93d6f3f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Core/Contents/Source/PolySDLCore.cpp

+ 1 - 1
Core/Contents/Source/PolySDLCore.cpp

@@ -463,7 +463,7 @@ void SDLCore::copyDiskItem(const String& itemPath, const String& destItemPath) {
     int childExitStatus;
     pid_t pid = fork();
     if (pid == 0) {
-        execl("/bin/cp", "/bin/cp", "-R", itemPath.c_str(), destItemPath.c_str(), (char *)0);
+        execl("/bin/cp", "/bin/cp", "-RT", itemPath.c_str(), destItemPath.c_str(), (char *)0);
     } else {
         pid_t ws = waitpid( pid, &childExitStatus, 0);
     }