diff options
-rw-r--r-- | xkbcomp.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -549,11 +549,14 @@ parseArgs(int argc, char *argv[]) { WARN1("Changing root directory to \"%s\"\n", rootDir); } - if ((chdir(rootDir) < 0) && (warningLevel > 0)) + if (chdir(rootDir) == 0) { - WARN1("Couldn't change directory to \"%s\"\n", rootDir); - ACTION("Root directory (-R) option ignored\n"); - rootDir = NULL; + XkbAddDirectoryToPath("."); + } else if (warningLevel > 0) + { + WARN1("Couldn't change directory to \"%s\"\n", rootDir); + ACTION("Root directory (-R) option ignored\n"); + rootDir = NULL; } } } |