summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/edsp')
-rw-r--r--apt-pkg/edsp/edsplistparser.cc6
-rw-r--r--apt-pkg/edsp/edspsystem.cc4
2 files changed, 4 insertions, 6 deletions
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index 77a0edc22..85a57479e 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -31,12 +31,10 @@ public:
edspListParserPrivate()
{
std::string const states = _config->FindFile("Dir::State::extended_states");
- if (states != "/dev/null")
- unlink(states.c_str());
+ RemoveFile("edspListParserPrivate", states);
extendedstates.Open(states, FileFd::WriteOnly | FileFd::Create | FileFd::Exclusive, 0600);
std::string const prefs = _config->FindFile("Dir::Etc::preferences");
- if (prefs != "/dev/null")
- unlink(prefs.c_str());
+ RemoveFile("edspListParserPrivate", prefs);
preferences.Open(prefs, FileFd::WriteOnly | FileFd::Create | FileFd::Exclusive, 0600);
}
};
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index 4c16f76d2..95abc1527 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -57,8 +57,8 @@ public:
if (tempDir.empty())
return;
- unlink(tempStatesFile.c_str());
- unlink(tempPrefsFile.c_str());
+ RemoveFile("DeInitialize", tempStatesFile);
+ RemoveFile("DeInitialize", tempPrefsFile);
rmdir(tempDir.c_str());
}