|
|
@ -54,7 +54,7 @@ void createTestDotfiles(const std::vector<std::string>& fileNames, const std::ve |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void removeTestDotfiles(const std::vector<std::string>& files) |
|
|
|
void removeTestDotfiles(const std::vector<std::string>& files, bool deleteInHome = true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
for (auto file : files) { |
|
|
|
for (auto file : files) { |
|
|
|
// Get the top-level directory
|
|
|
|
// Get the top-level directory
|
|
|
@ -68,6 +68,10 @@ void removeTestDotfiles(const std::vector<std::string>& files) |
|
|
|
std::filesystem::remove_all(file); |
|
|
|
std::filesystem::remove_all(file); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!deleteInHome) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Delete recursively in home directory
|
|
|
|
// Delete recursively in home directory
|
|
|
|
file = homeDirectory / file; |
|
|
|
file = homeDirectory / file; |
|
|
|
if (std::filesystem::exists(file) || std::filesystem::is_symlink(file)) { |
|
|
|
if (std::filesystem::exists(file) || std::filesystem::is_symlink(file)) { |
|
|
|