Don't automatically delete pbl files upon updating, downloading or removing

addons. (fix for bug #17628)

If a pbl file is present assuming that we have an addon author who
can delete his stuff manually if wanted.
This commit is contained in:
Anonymissimus 2011-06-01 12:25:02 +00:00
parent 751f710dec
commit cf1f03d86c

View file

@ -80,12 +80,12 @@ bool remove_local_addon(const std::string& addon, std::string* log)
LOG_CFG << "removing local add-on: " << addon << '\n';
if(file_exists(addon_dir) && !delete_directory(addon_dir)) {
if(file_exists(addon_dir) && !delete_directory(addon_dir, true)) {
messages << "Failed to delete directory/file: " << addon_dir << '\n';
ret = false;
}
if(file_exists(addon_dir + ".cfg") && !delete_directory(addon_dir + ".cfg")) {
if(file_exists(addon_dir + ".cfg") && !delete_directory(addon_dir + ".cfg", true)) {
messages << "Failed to delete directory/file: " << addon_dir << ".cfg\n";
ret = false;
}