From 002509336849e55e48f51922db44134ffc85d159 Mon Sep 17 00:00:00 2001 From: Marta Iborra Date: Mon, 24 Jul 2023 09:10:30 +0200 Subject: [PATCH] Do not return error when file does not exist --- blosc/directories.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blosc/directories.c b/blosc/directories.c index 22df8b34e..13a3ac0ff 100644 --- a/blosc/directories.c +++ b/blosc/directories.c @@ -11,6 +11,7 @@ #include "blosc2.h" #include +#include #include #include @@ -130,6 +131,10 @@ int blosc2_remove_urlpath(const char* urlpath){ if (urlpath != NULL) { struct stat statbuf; if (stat(urlpath, &statbuf) != 0){ + if (errno == ENOENT) { + // Path does not exist + return BLOSC2_ERROR_SUCCESS; + } BLOSC_TRACE_ERROR("Could not access %s", urlpath); return BLOSC2_ERROR_FAILURE; }