[ruby-core:93351] [Ruby trunk Bug#12615] Pathname#rename does not work across filesystem boundaries.
From:
merch-redmine@...
Date:
2019-06-24 23:25:13 UTC
List:
ruby-core #93351
Issue #12615 has been updated by jeremyevans0 (Jeremy Evans). Assignee set to akr (Akira Tanaka) Status changed from Open to Assigned 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. ---------------------------------------- Bug #12615: Pathname#rename does not work across filesystem boundaries. https://bugs.ruby-lang.org/issues/12615#change-78862 * Author: singpolyma (Stephen Paul Weber) * Status: Assigned * Priority: Normal * Assignee: akr (Akira Tanaka) * Target version: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- 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. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>