use $(LIBENSCVECTOR) instead of libensc_vector.a
[util-vserver.git] / util-vserver / lib / getvservercfgstyle.c
index 28550e6..7fca17a 100644 (file)
@@ -42,6 +42,8 @@ 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)
@@ -59,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 "/");
@@ -80,7 +82,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;
     }
   }