chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1634: copy-file and move-file do not preserve pe


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1634: copy-file and move-file do not preserve permissions
Date: Sun, 28 Jul 2019 21:17:49 -0000

#1634: copy-file and move-file do not preserve permissions
---------------------------------------+---------------------
            Reporter:  alicemaz        |      Owner:
                Type:  defect          |     Status:  new
            Priority:  minor           |  Milestone:  someday
           Component:  core libraries  |    Version:  5.1.0
          Resolution:                  |   Keywords:
Estimated difficulty:  easy            |
---------------------------------------+---------------------

Comment (by evhan):

 It's supposed to match the behaviour of copy-file, which ''actually''
 copies a file (as in, block-by-block). rename(2) has different semantics,
 for example when it comes to cross-filesystem operations. rename(2) is
 what you get with rename-file from the chicken.file module, which like you
 say offers the cost-free option.

 {{{
 #;1> (import (chicken file))
 #;2> (rename-file "/mnt/foo.txt" "/tmp/foo.txt")

 Error: (rename-file) cannot rename file - Invalid cross-device link
 "/mnt/foo.txt"
 "/tmp/foo.txt"

         Call history:

         <syntax>          (rename-file "/mnt/foo.txt" "/tmp/foo.txt")
         <eval>            (rename-file "/mnt/foo.txt" "/tmp/foo.txt")
 <--

 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1634#comment:3>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]