PathIs* were too noisy
authorjhurst <jhurst@cinecert.com>
Tue, 23 Jan 2007 23:32:11 +0000 (23:32 +0000)
committerjhurst <>
Tue, 23 Jan 2007 23:32:11 +0000 (23:32 +0000)
src/KM_fileio.cpp

index e0a83ea94ca96c4eff75d077bd9a99f5fe44e785..ec68f3804b78f206d23f917bf42a40cbdb4a7b1a 100644 (file)
@@ -106,7 +106,9 @@ do_fstat(HANDLE handle, fstat_t* stat_info)
 bool
 Kumu::PathIsFile(const char* pathname)
 {
-  assert(pathname);
+  if ( pathname == 0 || *pathname == 0 )
+    return false;
+
   fstat_t info;
 
   if ( KM_SUCCESS(do_stat(pathname, &info)) )
@@ -123,7 +125,9 @@ Kumu::PathIsFile(const char* pathname)
 bool
 Kumu::PathIsDirectory(const char* pathname)
 {
-  assert(pathname);
+  if ( pathname == 0 || *pathname == 0 )
+    return false;
+
   fstat_t info;
 
   if ( KM_SUCCESS(do_stat(pathname, &info)) )
@@ -140,7 +144,9 @@ Kumu::PathIsDirectory(const char* pathname)
 Kumu::fsize_t
 Kumu::FileSize(const char* pathname)
 {
-  assert(pathname);
+  if ( pathname == 0 || *pathname == 0 )
+    return false;
+
   fstat_t info;
 
   if ( KM_SUCCESS(do_stat(pathname, &info)) )