summaryrefslogtreecommitdiff
path: root/xkbpath.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-04-17 00:52:29 +0300
committerDaniel Stone <daniel@fooishbar.org>2008-04-17 00:53:28 +0300
commit1aecdffaa0db7bbf85bc0aae9043e9437b25c30d (patch)
tree747a82d8fd3c0805b7b9be13582065d4bd304055 /xkbpath.c
parenta3a05fd489a9a35942a4419c537634e796dbebd1 (diff)
downloadxorg-app-xkbcomp-1aecdffaa0db7bbf85bc0aae9043e9437b25c30d.tar.gz
Don't scan paths which make NO SENSE WHATSOEVER TO SCAN
Hey, I wonder if we have XKB files in our directory! I wonder if we haven't bothered with a structure, and let's try to open a file called 'misc' in someone's home directory! What a surprise, it's not a valid XKB file! Let's fail miserably! SURPRISINGLY, THIS IS NOT USEFUL BEHAVIOUR.
Diffstat (limited to 'xkbpath.c')
-rw-r--r--xkbpath.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/xkbpath.c b/xkbpath.c
index 0e1beab..0a7329c 100644
--- a/xkbpath.c
+++ b/xkbpath.c
@@ -133,7 +133,6 @@ XkbAddDefaultDirectoriesToPath(void)
{
if (noDefaultPath)
return;
- XkbAddDirectoryToPath(".");
XkbAddDirectoryToPath(DFLT_XKB_CONFIG_ROOT);
}
@@ -298,16 +297,7 @@ char buf[PATH_MAX],*typeDir;
typeLen= strlen(typeDir);
for (i=0;i<nPathEntries;i++) {
pathLen= strlen(includePath[i]);
- if ((nameLen+pathLen+1)>=PATH_MAX) {
- ERROR2("File name (%s/%s) too long\n",includePath[i],name);
- ACTION("Ignored\n");
- continue;
- }
- sprintf(buf,"%s/%s",includePath[i],name);
- file= fopen(buf,"r");
- if (file!=NULL)
- break;
- else if (typeLen<1)
+ if (typeLen<1)
continue;
if ((nameLen+typeLen+pathLen+2)>=PATH_MAX) {