aboutsummaryrefslogtreecommitdiff
path: root/src/conda.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conda.c')
-rw-r--r--src/conda.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conda.c b/src/conda.c
index f7c7250..ff55f14 100644
--- a/src/conda.c
+++ b/src/conda.c
@@ -109,6 +109,7 @@ int pip_index_provides(const char *index_url, const char *name, const char *vers
int logfd = mkstemp(logfile);
if (logfd < 0) {
perror(logfile);
+ remove(logfile); // fail harmlessly if not present
return -1;
}
@@ -139,9 +140,9 @@ int pip_index_provides(const char *index_url, const char *name, const char *vers
}
fflush(stderr);
fclose(fp);
- remove(logfile);
}
}
+ remove(logfile);
return proc.returncode == 0;
}