From 4f40f10b88fac030bd3a7cc9773589251c1c4e04 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Feb 2008 18:04:20 -0600 Subject: [PATCH] fix stack effect --- extra/io/files/unique/backend/backend.factor | 2 +- extra/io/files/unique/unique.factor | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extra/io/files/unique/backend/backend.factor b/extra/io/files/unique/backend/backend.factor index 228b6881f9..b26557688b 100644 --- a/extra/io/files/unique/backend/backend.factor +++ b/extra/io/files/unique/backend/backend.factor @@ -1,5 +1,5 @@ USING: io.backend ; IN: io.files.unique.backend -HOOK: (make-unique-file) io-backend ( prefix suffix -- stream path ) +HOOK: (make-unique-file) io-backend ( path -- stream ) HOOK: temporary-path io-backend ( -- path ) diff --git a/extra/io/files/unique/unique.factor b/extra/io/files/unique/unique.factor index 1e77cd6814..8c0666161e 100644 --- a/extra/io/files/unique/unique.factor +++ b/extra/io/files/unique/unique.factor @@ -22,11 +22,12 @@ IN: io.files.unique PRIVATE> : make-unique-file ( prefix suffix -- path stream ) +break temporary-path -rot [ unique-length random-name swap 3append path+ dup (make-unique-file) - ] 3curry unique-retries retry ; + ] 3curry unique-retries retry break ; : with-unique-file ( quot -- path ) >r f f make-unique-file r> rot [ with-stream ] dip ; inline