Use temporary path in LOOT data folder when cloning

If the user's temporary path is on a different drive,
boost::filesystem::rename errors (it seems like the WinAPI isn't
behaving as described), so don't use the user's temporary path just in
case.
This commit is contained in:
Oliver Hamlet
2016-09-15 08:10:26 +01:00
parent bc2e428ec4
commit 20b296a621
+1 -4
View File
@@ -146,10 +146,7 @@ void GitHelper::Clone(const boost::filesystem::path& path, const std::string& ur
// Clone the remote repository.
BOOST_LOG_TRIVIAL(info) << "Repository doesn't exist, cloning the remote repository.";
fs::path tempPath = fs::temp_directory_path() / fs::unique_path();
// Create the temporary parent folder in case it doesn't already exist.
fs::create_directories(tempPath.parent_path());
fs::path tempPath = path.parent_path() / fs::unique_path();
//Delete temporary folder in case it already exists.
fs::remove_all(tempPath);