From 8d5255d6a1c48987b9f4e080d86e1240d08bb28c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 May 2023 11:24:15 +1000 Subject: [PATCH] Fix BLI_rename returning success on failure for WIN32 When the `from` file didn't exist, BLI_rename returned success, the in-line doc-string was incorrect - remove in favor of the header's doc-string. This error existed since the initial revision. Note that this was fixed [0] for other systems. [0]: 622019a085c4a1e4290d588307cd8ab095c70231 --- source/blender/blenlib/intern/fileops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 08ddd8cdfa3..f533abe2aac 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -691,11 +691,10 @@ int BLI_create_symlink(const char *file, const char *to) } # endif -/** \return true on success (i.e. given path now exists on FS), false otherwise. */ int BLI_rename(const char *from, const char *to) { if (!BLI_exists(from)) { - return 0; + return 1; } /* Make sure `from` & `to` are different (case insensitive) before removing. */