Open hillu opened 6 years ago
Situation at start, on Debian GNU/Linux:
$ ls -ld /tmp/x /tmp/y -rw-r--r-- 1 bengen bengen 0 Feb 26 15:18 /tmp/x drwxr-xr-x 2 bengen bengen 4096 Feb 26 15:14 /tmp/y
Using Path::Class 0.37, doing something like
$x = file("/tmp/x"); $x->move_to("/tmp/y");
moves the file into the directory /tmp/y, so we end up with a file /tmp/y/x, but updates the Path::Class::File object like this:
/tmp/y
/tmp/y/x
Path::Class::File
VAR1 = bless( { 'file' => 'y', 'file_spec_class' => undef, 'dir' => bless( { 'volume' => '', 'file_spec_class' => undef, 'dirs' => [ '', 'tmp' ] }, 'Path::Class::Dir' ) }, 'Path::Class::File' );
I'd expect the operation to fail (like it would when using CORE::rename or POSIX::rename) or to update the name correctly.
Situation at start, on Debian GNU/Linux:
Using Path::Class 0.37, doing something like
moves the file into the directory
/tmp/y
, so we end up with a file/tmp/y/x
, but updates thePath::Class::File
object like this:I'd expect the operation to fail (like it would when using CORE::rename or POSIX::rename) or to update the name correctly.