From 522b83efc78f23210dfde1acaeeab8cc4e545c1f Mon Sep 17 00:00:00 2001 From: ccw808 Date: Tue, 13 Mar 2012 20:58:17 +0000 Subject: [PATCH] Fixed #6936 (Patch for deleteResource() and probably copyResource()) patch from SHC//Sniper --- MTA10_Server/mods/deathmatch/logic/CResourceManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MTA10_Server/mods/deathmatch/logic/CResourceManager.cpp b/MTA10_Server/mods/deathmatch/logic/CResourceManager.cpp index 62436b92d04..b29ba02c1a0 100644 --- a/MTA10_Server/mods/deathmatch/logic/CResourceManager.cpp +++ b/MTA10_Server/mods/deathmatch/logic/CResourceManager.cpp @@ -1091,6 +1091,8 @@ bool CResourceManager::MoveDirToTrash ( const SString& strPathDirName ) { // Get path to unique trash sub-directory SString strDestPathDirName = MakeUniquePath ( PathJoin ( GetResourceTrashDir (), ExtractFilename ( strPathDirName.TrimEnd ( "\\" ).TrimEnd ( "/" ) ) ) ); + // Make sure the trash directory exists and create if it does not + MakeSureDirExists ( GetResourceTrashDir () + "/" ); // Try move return FileRename ( strPathDirName, strDestPathDirName ); }