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