From 13e0bd19329597fd1b5ac8287417dc4c24eab589 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 6 Nov 2017 19:17:42 +0100 Subject: [PATCH] Change function signature of file_path_rename --- libretro-common/file/file_path.c | 8 ++++---- libretro-common/include/file/file_path.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index b8de88f896..8acd372e08 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -963,7 +963,7 @@ bool path_file_remove(const char *path) return false; } -int path_file_rename(const char *old_path, const char *new_path) +bool path_file_rename(const char *old_path, const char *new_path) { char *old_path_local = NULL; char *new_path_local = NULL; @@ -1017,10 +1017,10 @@ int path_file_rename(const char *old_path, const char *new_path) if (new_path_wide) free(new_path_wide); - - return -1; #endif #else - return rename(old_path, new_path); + if (rename(old_path, new_path) == 0) + return true; #endif + return false; } diff --git a/libretro-common/include/file/file_path.h b/libretro-common/include/file/file_path.h index 2b29d428fb..7e59d8d362 100644 --- a/libretro-common/include/file/file_path.h +++ b/libretro-common/include/file/file_path.h @@ -468,7 +468,7 @@ int32_t path_get_size(const char *path); bool path_file_remove(const char *path); -int path_file_rename(const char *old_path, const char *new_path); +bool path_file_rename(const char *old_path, const char *new_path); RETRO_END_DECLS