]> gitweb.factorcode.org Git - factor.git/commitdiff
wipe: fix the limit-stream parameter order
authorAlexander Ilin <alex.ilin@protonmail.com>
Wed, 23 Aug 2023 14:53:39 +0000 (16:53 +0200)
committerAlexander Ilin <alex.ilin@protonmail.com>
Wed, 23 Aug 2023 14:53:39 +0000 (16:53 +0200)
extra/wipe/wipe.factor

index 8a9bcbb27f7ea3c8f8de584fbdfced12cba49fc4..83957c005e5d9382433b5ade229d738ffac7246f 100644 (file)
@@ -14,7 +14,7 @@ os windows? [ "wipe.windows" require ] when
 
 : overwrite-with-random-bytes ( file-name -- )
     [ remove-read-only ] [ file-info size>> ] [ ] tri binary [
-        <random-stream> limit-stream
+        <random-stream> swap limit-stream
         0 seek-absolute output-stream get
         [ stream-seek ] keep stream-copy
     ] with-file-appender ;
@@ -38,7 +38,7 @@ os windows? [ "wipe.windows" require ] when
     dup [
         file-system-info free-space>>
         "" "" unique-file binary [
-            <random-stream> limit-stream
+            <random-stream> swap limit-stream
             output-stream get stream-copy
         ] with-file-writer
     ] with-temp-directory-at ;