--- libelwix/src/av.c 2014/01/29 14:16:54 1.2 +++ libelwix/src/av.c 2018/05/31 15:34:28 1.3.32.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: av.c,v 1.2 2014/01/29 14:16:54 misho Exp $ +* $Id: av.c,v 1.3.32.1 2018/05/31 15:34:28 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2018 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -156,6 +156,9 @@ av_Path2File(const char * __restrict csArgs, char * __ pos = strrchr(psBuf, '/'); if (!pos) { + if (psPath) + strlcpy(psPath, ".", pathLen); + strlcpy(psFile, psBuf, fileLen); e_free(psBuf); @@ -165,7 +168,7 @@ av_Path2File(const char * __restrict csArgs, char * __ strlcpy(psFile, pos, fileLen); if (psPath) - strlcpy(psPath, psBuf, pathLen); + strlcpy(psPath, *psBuf ? psBuf : "/", pathLen); e_free(psBuf); return 2;