IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
26.17k stars 1.42k forks source link

[Bug] Sidebar can duplicate the same folder twice #1991

Open yichenchong opened 2 months ago

yichenchong commented 2 months ago

Describe the bug

A folder can appear duplicated on the sidebar. Problem persists upon restart.

To Reproduce

  1. Create a "Shared" folder in the "DATA" directory. It should appear in the sidebar. (I've also had instances where these folders don't appear in the sidebar, but I named mine "transfer" if that is more reproducible).
  2. Go to the shell and delete the folder there with "rm"
  3. Go back to Files and click the folder. It should give a "no files found error".
  4. Create a folder in the same location.
  5. Now you have two of the same folder in the sidebar, both of which light up when you click it.

Expected behavior

Either a) the folder in the sidebar never disappearing, but just reconnects to the new folder when created or b) the folder in the sidebar disappears when it is deleted. Would also be nice to be able to add or remove folders from the sidebar, and then have new folders in the sidebar only appear when added, instead of tracking the contents of "DATA".

Screenshots

image

Desktop (please complete the following information):

 - Client OS: Windows 11
 - Browser: Brave
 - CasaOS OS: Debian bullseye
 - CasaOS Version: v0.4.11

System Time

               Local time: Sun 2024-09-08 13:24:39 BST
           Universal time: Sun 2024-09-08 12:24:39 UTC
                 RTC time: Sun 2024-09-08 12:24:39
                Time zone: Europe/London (BST, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Logs

Not really relevant: all logs no errors

Additional context

N/A