fixed detection of legacy-style (check for file but not directory)
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 19 Aug 2004 13:56:14 +0000 (13:56 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 19 Aug 2004 13:56:14 +0000 (13:56 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1652 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/lib/getvservercfgstyle.c

index 28550e6..c45a816 100644 (file)
@@ -42,6 +42,7 @@ isAbsPath(char const *p)
 }
 
 #define ISDIR  utilvserver_isDirectory(buf, true)
+#define ISFILE utilvserver_isFile(buf, true)
 
 vcCfgStyle
 vc_getVserverCfgStyle(char const *id)
@@ -80,7 +81,7 @@ vc_getVserverCfgStyle(char const *id)
       strcpy(buf+sizeof(CONFDIR "/") - 1,    id);
       strcpy(buf+sizeof(CONFDIR "/")+l1 - 1, ".conf");
 
-      if (!ISDIR) res = vcCFG_NONE;
+      if (!ISFILE) res = vcCFG_NONE;
     }
   }