+2003-01-15 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * elmo-localdir.el (elmo-folder-rename-internal): If new-dir exist
+ as non-directory, cause error before rename-file.
+ * elmo-archive.el (elmo-folder-rename-internal): Create directory
+ apropriately, mimic localdir's one.
+ Based on the patch from KAMO Tomoyuki <kamo@ITmanage.co.jp>.
+
2003-01-10 Tsutomu OKADA <okada@furuno.co.jp>
* elmo-map.el (elmo-folder-pack-numbers): Fix name of the function.
(luna-define-method elmo-folder-rename-internal ((folder elmo-archive-folder)
new-folder)
(let* ((old-arc (elmo-archive-get-archive-name folder))
- (new-arc (elmo-archive-get-archive-name new-folder)))
+ (new-arc (elmo-archive-get-archive-name new-folder))
+ (new-dir (directory-file-name
+ (elmo-archive-get-archive-directory new-folder))))
+ (if elmo-archive-treat-file
+ (setq new-dir (directory-file-name (file-name-directory new-dir))))
(unless (and (eq (elmo-archive-folder-archive-type-internal folder)
(elmo-archive-folder-archive-type-internal new-folder))
(equal (elmo-archive-folder-archive-prefix-internal
(error "No such file: %s" old-arc)
(if (file-exists-p new-arc)
(error "Already exists: %s" new-arc)
+ (if (not (file-directory-p new-dir))
+ (elmo-make-directory new-dir))
(rename-file old-arc new-arc)
t))))
(error "No such directory: %s" old)
(if (file-exists-p new)
(error "Already exists directory: %s" new)
- (if (not (file-exists-p new-dir))
+ (if (not (file-directory-p new-dir))
(elmo-make-directory new-dir))
(rename-file old new)
t))))