13bdca
--- ttmkfdir-3.0.9/directory.cpp.back	2005-10-08 14:25:37.839328408 +0800
13bdca
+++ ttmkfdir-3.0.9/directory.cpp	2005-10-08 14:26:00.021956136 +0800
13bdca
@@ -1,5 +1,6 @@
13bdca
 #include <cctype>
13bdca
 #include <dirent.h>
13bdca
+#include <stdio.h>
13bdca
 #include <sys/stat.h>
13bdca
 #include <unistd.h>
13bdca
 
13bdca
@@ -13,6 +14,10 @@
13bdca
 directory::scan (const std::string &dir)
13bdca
 {
13bdca
     DIR *ttfdir = opendir(dir.c_str ());
13bdca
+    if (!ttfdir) {
13bdca
+        printf("%s is not exist!\n", dir.c_str ());
13bdca
+        exit(-1);
13bdca
+    }
13bdca
 
13bdca
     this->clear ();
13bdca
     dirpath = dir;