mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user