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