From 6df0255360f1780bda1f574cdef7a3f4e1f62dea Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 22 Apr 2011 19:56:00 +0200 Subject: [PATCH] Check return value of chdir Not checking this causes a warning when building under Fedora which becomes an error because of -Werror. --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e24da31..c5e9ba8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,7 +104,11 @@ int main(int argc, char *argv[]) #endif #if RELEASE - chdir(PAKLOCATION); + if (chdir(PAKLOCATION)) + { + perror("Could not chdir to " PAKLOCATION ":"); + return 1; + } #endif config.engine = &engine; -- 2.39.5