فهرست منبع

Linux - remove destination file or directory before copying to it.

Christopher Reed 12 سال پیش
والد
کامیت
e5d25ff53a
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      Core/Contents/Source/PolySDLCore.cpp

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

@@ -443,6 +443,7 @@ void SDLCore::createFolder(const String& folderPath) {
 }
 }
 
 
 void SDLCore::copyDiskItem(const String& itemPath, const String& destItemPath) {
 void SDLCore::copyDiskItem(const String& itemPath, const String& destItemPath) {
+    removeDiskItem(destItemPath);
     int childExitStatus;
     int childExitStatus;
     pid_t pid = fork();
     pid_t pid = fork();
     if (pid == 0) {
     if (pid == 0) {