From 01d9af12f708fe8d439d4c3ddea2ccd279926448 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 1 Nov 2020 18:14:55 +0100 Subject: REDESIGNED: ChangeDirectory() Not returning error code (or success), just log if it fails --- src/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index a37d70f1..a637d5ed 100644 --- a/src/core.c +++ b/src/core.c @@ -2217,10 +2217,12 @@ void ClearDirectoryFiles(void) dirFilesCount = 0; } -// Change working directory, returns true if success -bool ChangeDirectory(const char *dir) +// Change working directory +void ChangeDirectory(const char *dir) { - return (CHDIR(dir) == 0); + bool result = CHDIR(dir); + + if (result != 0) TRACELOG(LOG_WARNING, "SYSTEM: Failed to change to directory: %s", dir); } // Check if a file has been dropped into window -- cgit v1.2.3