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