summaryrefslogtreecommitdiff
path: root/xkbcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkbcomp.c')
-rw-r--r--xkbcomp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xkbcomp.c b/xkbcomp.c
index 51eb224..37dc8f5 100644
--- a/xkbcomp.c
+++ b/xkbcomp.c
@@ -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;
}
}
}