chiark
/
gitweb
/
~mdw
/
lisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kill the unix-try macro.
[lisp]
/
safely.lisp
diff --git
a/safely.lisp
b/safely.lisp
index 5eddef3abacc59e0c6eb1e9375dd717a5e6920d1..f62420c7e962f9b48f75ddfc256356a94b31fa6d 100644
(file)
--- a/
safely.lisp
+++ b/
safely.lisp
@@
-68,13
+68,13
@@
(defun safely-open-output-stream (safe file &rest open-args)
(defun delete-file-without-moaning (file)
"Delete the FILE, ignoring errors."
(when (probe-file file)
(defun delete-file-without-moaning (file)
"Delete the FILE, ignoring errors."
(when (probe-file file)
- (
unix-try
unlink file)))
+ (
sys-
unlink file)))
(defun rename-file-without-moaning (old new)
"Rename OLD to NEW, ignoring errors, and without doing any stupid name
mangling."
(when (probe-file old)
(defun rename-file-without-moaning (old new)
"Rename OLD to NEW, ignoring errors, and without doing any stupid name
mangling."
(when (probe-file old)
- (
unix-try
rename old new)))
+ (
sys-
rename old new)))
(defun safely-unwind (trail)
"Roll back the TRAIL of operations."
(defun safely-unwind (trail)
"Roll back the TRAIL of operations."
@@
-131,11
+131,11
@@
(defun safely-commit (safe)
(copy-file file old)
(push `(:revert ,old ,file) revert))
(push `(:rmtmp ,file) revert))
(copy-file file old)
(push `(:revert ,old ,file) revert))
(push `(:rmtmp ,file) revert))
- (
unix-try
rename new file)))
+ (
sys-
rename new file)))
(:delete (destructuring-bind (tag file old) job
(declare (ignore tag))
(push `(:revert ,old ,file) revert)
(:delete (destructuring-bind (tag file old) job
(declare (ignore tag))
(push `(:revert ,old ,file) revert)
- (
unix-try
rename file old)
+ (
sys-
rename file old)
(push `(:rmtmp old) cleanup))))))
(setf revert nil))
(safely-unwind trail)
(push `(:rmtmp old) cleanup))))))
(setf revert nil))
(safely-unwind trail)