allow dangling symlinks as /etc/vservers/.../vdir also
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 26 Jan 2005 23:29:06 +0000 (23:29 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 26 Jan 2005 23:29:06 +0000 (23:29 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1804 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/lib/getvservercfgstyle.c

index c45a816..7fca17a 100644 (file)
@@ -43,6 +43,7 @@ isAbsPath(char const *p)
 
 #define ISDIR  utilvserver_isDirectory(buf, true)
 #define ISFILE utilvserver_isFile(buf, true)
+#define ISLINK utilvserver_isLink(buf)
 
 vcCfgStyle
 vc_getVserverCfgStyle(char const *id)
@@ -60,7 +61,7 @@ vc_getVserverCfgStyle(char const *id)
   strcpy(marker, "/vdir");
 
   is_path = isAbsPath(buf) || isRelPath(buf);
-  if (is_path && ISDIR)
+  if (is_path && (ISDIR || ISLINK))
     res = vcCFG_RECENT_FULL;
   else if (!is_path) {
     strcpy(buf,                         CONFDIR "/");