release candidate
[asdcplib.git] / src / KM_fileio.cpp
index 95bee9bdda770b38ae70e133b337b22279e62df9..b9257abda88d7d9c87bd929cbce7a9bd806c47c7 100644 (file)
@@ -350,7 +350,7 @@ Kumu::PathMakeAbsolute(const std::string& Path, char separator)
     }
 
   PathCompList_t CList;
-  CList.push_back(cwd_buf);
+  PathToComponents(cwd_buf, CList);
   CList.push_back(Path);
 
   return ComponentsToAbsolutePath(s_PathMakeCanonical(CList, true), separator);
@@ -1400,7 +1400,6 @@ Result_t
 Kumu::CreateDirectoriesInPath(const std::string& Path)
 {
   bool abs = PathIsAbsolute(Path);
-  assert(abs);
   PathCompList_t PathComps, TmpPathComps;
 
   PathToComponents(Path, PathComps);
@@ -1456,7 +1455,9 @@ Kumu::DeleteFile(const std::string& filename)
 Result_t
 h__DeletePath(const std::string& pathname)
 {
-  fprintf(stderr, "h__DeletePath %s\n", pathname.c_str());
+  if ( pathname.empty() )
+    return RESULT_NULL_STR;
+
   Result_t result = RESULT_OK;
 
   if ( ! PathIsDirectory(pathname) )