Hacker News new | past | comments | ask | show | jobs | submit login

> On Windows it isn't possible to remove or rename files and directories that are being used

Besides some access modes you can rename files in use. I did even bothered and tried on firefox.exe I'm typing this - it works fine.




My information might be old. I haven’t worked on a Windows application in 5+ years. At that point you couldn’t.


... it worked like that since Windows XP


You absolutely sure about that? https://www.biology-it.iastate.edu/solution-cannot-rename-fi...

https://answers.microsoft.com/en-us/windows/forum/all/renami...

https://superuser.com/questions/54193/how-can-i-rename-files...

From Mozilla: On Windows, it is not possible to remove or rename files and directories which are being used. In order to handle this, we need to add a little complexity.

The Firefox executable will launch a helper application copied to somewhere outside of the installation directory, most likely the system's temporary directory. The helper application renames the existing installation directory to a new directory with ".tmp" appended to its path name. If the rename operation fails in the middle of the operation because of a file being open by another application, it reverts the change.

Source: https://wiki.mozilla.org/Background_Updates


Yes, see https://imgur.com/a/8XdMVmF

FF tries to rename a directory with files opened under it. No sane OS should allow that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: