]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp/edsplistparser.cc
wrap every unlink call to check for != /dev/null
[apt.git] / apt-pkg / edsp / edsplistparser.cc
index 77a0edc22c8ef13d8e4112b68a2e90b969ef7f42..85a57479ec2e83807857adad51d1766a8699dff4 100644 (file)
@@ -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);
    }
 };