Note: If You Rename a Folder and Open It Too Fast You Get an Error on Nemo

Share

On Nemo, if you create a new folder, give it a name and confirm it by pressing the Enter key, and try to open it by pressing the Enter key again very quickly, you get an error as Nemo tries to open the folder with according to its old name despite the fact you just renamed it.

I haven't seen the code but I'm going to guess the reason for this is that Nemo watches the current location for changes and this has a frequency of some hundreds of milliseconds. That's because it's possible, although unlikely, that if you try to rename something it won't actually get renamed, so all of this has to be done asynchronously despite it being on the disk: first Nemo requests the operating system to rename the file, the system renames the file, then Nemo receives a signal the directory has changed, and so it updates the displayed list accordingly. In the latency between the start and the end of this process, Nemo displays a list of files that is stale, causing the bug to occur.

Some ways this could be fixed could be by keeping track of the selected inode instead, or just by assuming the file was renamed correctly and trying the old filename as a fallback.

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments