diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/filesystem.c | 12 | ||||
-rw-r--r-- | src/filesystem.h | 4 | ||||
-rw-r--r-- | src/state.c | 4 |
3 files changed, 2 insertions, 18 deletions
diff --git a/src/filesystem.c b/src/filesystem.c index 48e046d..6958600 100644 --- a/src/filesystem.c +++ b/src/filesystem.c @@ -405,15 +405,3 @@ lilv_create_directories(const char* dir_path) free(path); return 0; } - -int -lilv_remove(const char* path) -{ -#ifdef _WIN32 - if (lilv_is_directory(path)) { - return !RemoveDirectory(path); - } -#endif - - return remove(path); -} diff --git a/src/filesystem.h b/src/filesystem.h index e995cf4..9337a97 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -124,7 +124,3 @@ lilv_create_temporary_directory(const char* pattern); */ int lilv_create_directories(const char* dir_path); - -/// Remove the file or empty directory at `path` -int -lilv_remove(const char* path); diff --git a/src/state.c b/src/state.c index 920d067..bf112b4 100644 --- a/src/state.c +++ b/src/state.c @@ -1305,7 +1305,7 @@ static void try_unlink(const char* state_dir, const char* path) { if (!strncmp(state_dir, path, strlen(state_dir))) { - if (zix_file_type(path) != ZIX_FILE_TYPE_NONE && lilv_remove(path)) { + if (zix_file_type(path) != ZIX_FILE_TYPE_NONE && zix_remove(path)) { LILV_ERRORF("Failed to remove %s (%s)\n", path, strerror(errno)); } } @@ -1397,7 +1397,7 @@ lilv_state_delete(LilvWorld* world, const LilvState* state) } } - if (lilv_remove(state->dir)) { + if (zix_remove(state->dir)) { LILV_ERRORF( "Failed to remove directory %s (%s)\n", state->dir, strerror(errno)); } |