From 8cdddbb0f1a8c6eb023cbe732e5701240a54ff3c Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 18 Apr 2020 15:28:54 -0400 Subject: Implement error handling * Die on bad root directory --- lib/fs.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/fs.c') diff --git a/lib/fs.c b/lib/fs.c index 3ba01e7..20a5999 100644 --- a/lib/fs.c +++ b/lib/fs.c @@ -624,7 +624,6 @@ char *spm_mkdtemp(const char *base, const char *name, const char *extended_path) path_stat = stat(path, &st); if (path_stat < 0) { if ((fp = fopen(path, "w+")) == NULL) { - perror(path); return -1; } fclose(fp); @@ -632,7 +631,6 @@ char *spm_mkdtemp(const char *base, const char *name, const char *extended_path) if ((S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) > 0) { if (utime(path, NULL) < 0) { // failed to set file time - perror(path); return -1; } // updated file time -- cgit