(if (null (tramp-file-name-method hup))
(format
"/%s:%s" (tramp-file-name-host hup) (tramp-file-name-localname hup))
- (tramp-make-tramp-file-name
- (tramp-file-name-method hup)
- (tramp-file-name-user hup)
- (tramp-file-name-domain hup)
- (tramp-file-name-host hup)
- (tramp-file-name-port hup)
- (tramp-file-name-localname hup)
- (tramp-file-name-hop hup)))))
+ (tramp-make-tramp-file-name hup))))
(defun shadow-replace-name-component (fullname newname)
"Return FULLNAME with the name component changed to NEWNAME."
shadow-files-to-copy
cluster1 cluster2 primary regexp file)
(unwind-protect
+ (condition-case err
(progn
;; Cleanup.
(when (file-exists-p shadow-info-file)
(concat (shadow-site-primary cluster2) file)
(shadow-contract-file-name (concat "/cluster1:" file)))
shadow-files-to-copy)))
+ (error (message "Error: %s" err) (signal (car err) (cdr err))))
;; Cleanup.
(when (file-exists-p shadow-info-file)
(delete-file shadow-info-file))
(when (file-exists-p shadow-todo-file)
(delete-file shadow-todo-file))
- (when (file-exists-p file)
- (delete-file file))
- (when (file-exists-p (concat (shadow-site-primary cluster2) file))
- (delete-file (concat (shadow-site-primary cluster2) file))))))
+ (ignore-errors
+ (when (file-exists-p file)
+ (delete-file file)))
+ (ignore-errors
+ (when (file-exists-p (concat (shadow-site-primary cluster2) file))
+ (delete-file (concat (shadow-site-primary cluster2) file)))))))
(ert-deftest shadow-test09-shadow-copy-files ()
"Check that needed shadow files are copied."
(delete-file shadow-info-file))
(when (file-exists-p shadow-todo-file)
(delete-file shadow-todo-file))
- (when (file-exists-p file)
- (delete-file file))
- (when (file-exists-p (concat (shadow-site-primary cluster2) file))
- (delete-file (concat (shadow-site-primary cluster2) file))))))
+ (ignore-errors
+ (when (file-exists-p file)
+ (delete-file file)))
+ (ignore-errors
+ (when (file-exists-p (concat (shadow-site-primary cluster2) file))
+ (delete-file (concat (shadow-site-primary cluster2) file)))))))
(defun shadowfile-test-all (&optional interactive)
"Run all tests for \\[shadowfile]."