Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#353 closed enhancement (fixed)

file-copy does not what I'd think when used on directories

Reported by: Moritz Heidkamp Owned by: felix winkelmann
Priority: minor Milestone: 4.9.0
Component: core libraries Version: 4.5.x
Keywords: Cc:
Estimated difficulty:

Description

Currently, file-copy used on a directory will create an empty regular file. It is certainly true that one should not expect it to work on directories but I think signalling an error or returning #f when doing so would be more sensible than the current behavior.

Change History (6)

comment:1 Changed 14 years ago by felix winkelmann

Milestone: 4.6.04.7.0
Owner: set to felix winkelmann
Priority: not urgent at allminor
Status: newassigned

comment:2 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: assignedclosed

file-copy and file-move signal an error if used on a directory, now. See "experimental" branch.

comment:3 Changed 14 years ago by sjamaan

Didn't file-move do the right thing when used on directories? It'd be a shame if that worked before but now throws an error. I don't know how it works on Windows, but in Unix moving is renaming. Or do we have a separate procedure for that?

comment:4 in reply to:  3 Changed 14 years ago by felix winkelmann

Replying to sjamaan:

Didn't file-move do the right thing when used on directories? It'd be a shame if that worked before but now throws an error. I don't know how it works on Windows, but in Unix moving is renaming. Or do we have a separate procedure for that?

file-copy and file-move only copy/move files by manually reading writing blocks of data. Mostly useless.

rename-file (library unit) does a proper rename(2) system call.

comment:5 Changed 14 years ago by felix winkelmann

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:6 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.