(make-directory-internal): Rewrite.
authoryamaoka <yamaoka>
Wed, 9 Dec 1998 05:44:39 +0000 (05:44 +0000)
committeryamaoka <yamaoka>
Wed, 9 Dec 1998 05:44:39 +0000 (05:44 +0000)
ChangeLog
poe-18.el

index b89b8f7..482935a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1998-12-09  Yuuichi Teranishi <teranisi@gohome.org>
+
+       * poe-18.el (make-directory-internal): Rewrite.
+
 1998-12-08  Katsumi Yamaoka   <yamaoka@jpl.org>
 
        * poem-20.el (write-region-as-binary): Bind
index 3265110..60ef79b 100644 (file)
--- a/poe-18.el
+++ b/poe-18.el
@@ -143,11 +143,10 @@ If NEW is a string, that is the `use instead' message."
 (defun make-directory-internal (dirname)
   "Create a directory. One argument, a file name string.
 \[poe-18.el; EMACS 19 emulating function]"
-  (if (file-exists-p dirname)
-      (error "Creating directory: %s is already exist" dirname)
-    (if (not (= (call-process "mkdir" nil nil nil dirname) 0))
-       (error "Creating directory: no such file or directory, %s" dirname)
-      )))
+ (let ((dir (expand-file-name dirname)))
+   (if (file-exists-p dir)
+      (error "Creating directory: %s is already exist" dir)
+     (call-process "mkdir" nil nil nil dir))))
 
 (defun make-directory (dir &optional parents)
   "Create the directory DIR and any nonexistent parent dirs.