X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fgetvservercfgstyle.c;h=7fca17a7b648c61a03a49d8c8a0ab8ca7dca1957;hb=3eb1b2279739d0f16391a3724a9897c686f030d3;hp=28550e6bc232d8c31b2621fd06a029a5ab4fb670;hpb=e68ebf155702803d08a814b095e9ea39f63e3347;p=util-vserver.git diff --git a/util-vserver/lib/getvservercfgstyle.c b/util-vserver/lib/getvservercfgstyle.c index 28550e6..7fca17a 100644 --- a/util-vserver/lib/getvservercfgstyle.c +++ b/util-vserver/lib/getvservercfgstyle.c @@ -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; } }