glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.37k stars 468 forks source link

Renaming a directory may result in strange behaviour #1693

Closed dmrlx closed 7 months ago

dmrlx commented 7 months ago

Description

Renaming a directory may result in duplicate directories at first, and after closing and opening the app, they won't show up, although they will be visible in iCloud

To Reproduce

  1. Create top level directory, e.g. "Test"
  2. Create another directory inside, e.g. "New folder"
image image
  1. Rename directory to "New Folder"
image image
  1. Folder was duplicated
image

In iCloud (obviously) we have only one dir

image
  1. Close fsnotes app and open again. The "Test" dir is empty
image

But "New Folder" dir exists in iCloud

image

Expected behavior

No response

FSNotes version

Version 6.6.7 (614)

macOS/iOS version

macOS 14.2.1 (23C71)

Additional context

No response

glushchenko commented 7 months ago

Can you reliable reproduce it? Me not.

dmrlx commented 7 months ago

Yes, I can. I'd say close to 100% of the time.

I recorded the process and placed file to my google drive https://drive.google.com/file/d/1LqZFANJchC0nLJZBQymWRFUNqzDmrY30/view?usp=share_link

0:35 While the application is loading, you can see both folders appear and disappear

dmrlx commented 7 months ago

Reproduced the same issue on personal mac (M1 Pro) and 14.3 (23D56)

glushchenko commented 7 months ago

Nice catch! Reproduced. Will be fixed ASAP.

glushchenko commented 7 months ago

Fixed here: https://github.com/glushchenko/fsnotes/releases/download/6.6.8/FSNotes_6.6.8.zip

glushchenko commented 7 months ago

Case sensitive renaming is disabled (no more "a" to "A" renaming). You can rename from "a" to "b" and then "b" to "A". This is a cheap technical solution.

dmrlx commented 7 months ago

Is it temporary “cheap technical solution”?

glushchenko commented 7 months ago

APFS is case insensitive by default, so there's no reason to implement this. So no, this is a permanent solution.

By the way how often do you rename directories?