Project

General

Profile

Actions

Bug #12615

closed

Pathname#rename does not work across filesystem boundaries.

Added by singpolyma (Stephen Paul Weber) over 8 years ago. Updated about 5 years ago.

Status:
Closed
Target version:
-
[ruby-core:76535]

Description

So I must continue to use FileUtils.mv -- either Pathname#rename should be fixed or (if the current behaviour is desired) and Pathname#mv added.

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Status changed from Open to Assigned
  • Assignee set to akr (Akira Tanaka)

I do not think this is a bug. Pathname#rename operates exactly like File.rename, which like rename(2), require that the source and destination be on the same file system.

FileUtils.mv tries to use File.rename, and if it fails due to Errno::EXDEV, then it copies the file manually. If you would like Pathname#mv added, please submit a feature request for that.

Actions #2

Updated by jeremyevans0 (Jeremy Evans) about 5 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0