Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#4082 closed Bugs (fixed)

rename effects differ between POSIX and Windows systems

Reported by: Andrey Semashev Owned by: Beman Dawes
Milestone: Boost 1.43.0 Component: filesystem
Version: Boost 1.42.0 Severity: Problem
Keywords: rename Cc:

Description

In case if rename() is called in the way that the source path points to a file on one device (drive) and the target path points to a file on another device, rename() moves the file on Windows, but fails on POSIX systems. I'd expect the function to behave similarly on all systems.

Change History (2)

comment:1 by Beman Dawes, 12 years ago

Resolution: fixed
Status: newclosed

For Filesystem version 3, scheduled to ship with boost 1.44, rename() on Windows uses MoveFileEx rather than MoveFile. MoveFileEx should more closely mimic POSIX semantics.

Thanks,

--Beman

comment:2 by Andrey Semashev, 12 years ago

Will there be a function that actually moves the file in the described case rather than fails?

Note: See TracTickets for help on using tickets.