Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileSystemEntity.rename has platform-dependent behavior and incorrect specification. #14340

Open
whesse opened this issue Oct 23, 2013 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@whesse
Copy link
Member

whesse commented Oct 23, 2013

The behavior of File.rename, Link.rename, and Directory.rename differs on different platforms, and is not specified correctly in the documentation.

The underlying rename provided by the OS differs on Windows and Linux, so Linux is atomic in some cases, and Windows is never guaranteed to be atomic. Overwriting an existing file system object has different behavior, depending on the type of the object overwritten.

To make a uniform specification, we should implement .replace that overwrites the target no matter what it is, but this would use non-atomic delete, rename sequences for some cases.

The fact that rename is atomic in some cases on some platforms would be an additional piece of information, not part of the basic behavior of rename.

When renaming a directory, we need to be careful of cases where the source and target have a parent-child relationship, and in all cases we want x.rename(x) to be a no-op.
 

@whesse
Copy link
Member Author

whesse commented Nov 4, 2013

Removed the owner.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Library-IO, Area-Library labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@whesse whesse added Type-Defect library-io area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants