summaryrefslogtreecommitdiff
path: root/cmdline/apt-dump-solver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-dump-solver.cc')
-rw-r--r--cmdline/apt-dump-solver.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index 2e352931f..47b515be5 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -53,7 +53,8 @@ int main(int argc,const char *argv[]) /*{{{*/
return 0;
}
- unlink(filename);
+ if (strcmp(filename, "/dev/null") != 0)
+ unlink(filename);
FileFd input, output;
if (input.OpenDescriptor(STDIN_FILENO, FileFd::ReadOnly) == false ||
output.Open(filename, FileFd::WriteOnly | FileFd::Create | FileFd::Exclusive, 0600) == false ||