#5251: copyFile does not copy metadata
---------------------------------+------------------------------------------
    Reporter:  Orphi             |       Owner:                     
        Type:  bug               |      Status:  new                
    Priority:  normal            |   Component:  libraries/directory
     Version:  7.0.2             |    Keywords:                     
    Testcase:                    |   Blockedby:                     
          Os:  Unknown/Multiple  |    Blocking:                     
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown       
---------------------------------+------------------------------------------

Comment(by Orphi):

 For reference, here are the Windows-specific things which are ''not''
 copied by `copyFile`:

  * The "hidden" attribute.

  * The "system" attribute.

  * The "compressed" attribute.

  * The "indexed" attribute.

  * Security settings.

  * File owner.

  * Auditing settings.

  * Alternative Data Streams.

 The "archive" bit is also not copied - but this is almost certainly the
 ''correct'' thing to do.

 Interestingly, the "read only" attribute ''is'' copied correctly.

 I was unable to test the following, but I believe they will be lost too:

  * Sparse files [will become dense when copied].

  * FS-level encryption.

 As you can see, Windows stores a hell of a lot of metadata about files,
 almost all of which the naive `copyFile` implementation is blindly
 stripping off. It wouldn't surprise me if it drops metadata on Unix too,
 although I haven't had time to test yet.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5251#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to