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

Linux Trashing a symlink to a directory will trash the target directory not the symlink #22399

Open
1 task done
mempler opened this issue Dec 24, 2024 · 3 comments
Open
1 task done
Labels
bug [core label] good first issue Issue suitable for first-time contributors linux project panel Feedback for files tree view reproducible Verified steps to reproduce included

Comments

@mempler
Copy link

mempler commented Dec 24, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Usually, editors like VSCode will only delete the symlink itself, not the target's content or the target itself. I'm unsure what exactly gets moved to trash. but as a user, I'll just assume the symlink's target.

Zed Version and System Specs

Zed: v0.166.1 (Zed)
OS: Linux X11 pop 22.04
Memory: 62.7 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 3060 || NVIDIA || 560.35.03

If applicable, add screenshots or screencasts of the incorrect state / behavior

Screencast.from.12-24-2024.05.28.54.PM.webm

notice the /simple/src folder disappearing. it got moved to trash.

If applicable, attach your Zed.log file to this issue.

Zed.log
2024-12-24T17:28:38.275163625+01:00 [INFO] ========== starting zed ==========
2024-12-24T17:28:38.297273596+01:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-12-24T17:28:38.297392311+01:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-12-24T17:28:38.304628084+01:00 [INFO] Try connect ibus
2024-12-24T17:28:38.305411814+01:00 [INFO] perform;
2024-12-24T17:28:38.305475534+01:00 [INFO] authenticate;
2024-12-24T17:28:38.305517694+01:00 [INFO] Opening main db
2024-12-24T17:28:38.305587005+01:00 [INFO] read_command;
2024-12-24T17:28:38.305655815+01:00 [INFO] send_secondary_commands;
2024-12-24T17:28:38.306063355+01:00 [INFO] new;
2024-12-24T17:28:38.306125051+01:00 [INFO] socket reader;
2024-12-24T17:28:38.306544804+01:00 [INFO] Opening main db
2024-12-24T17:28:38.306718021+01:00 [INFO] keep_updated;
2024-12-24T17:28:38.308731262+01:00 [INFO] Using git binary path: None
2024-12-24T17:28:38.34654109+01:00 [INFO] set environment variables from shell:/bin/bash, path:/home/robin/.local/bin:/home/robin/.local/bin:/home/robin/.cargo/bin:/home/robin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/robin/.local/bin
2024-12-24T17:28:38.346757088+01:00 [INFO] No prompt template overrides directory found at /home/robin/.local/share/zed/prompt_overrides. Using built-in prompts.
2024-12-24T17:28:38.359352382+01:00 [INFO] extensions updated. loading 3, reloading 0, unloading 0
2024-12-24T17:28:38.361617309+01:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-12-24T17:28:38.362826623+01:00 [INFO] Opening main db
2024-12-24T17:28:38.363189007+01:00 [INFO] perform;
2024-12-24T17:28:38.363239903+01:00 [INFO] authenticate;
2024-12-24T17:28:38.363298835+01:00 [INFO] read_command;
2024-12-24T17:28:38.363674083+01:00 [INFO] socket reader;
2024-12-24T17:28:38.367409888+01:00 [INFO] Using Visual { id: 35, colormap: 0, depth: 32 }
2024-12-24T17:28:38.367463038+01:00 [INFO] Creating colormap 41943043
2024-12-24T17:28:38.369699491+01:00 [INFO] new;
2024-12-24T17:28:38.370411235+01:00 [INFO] keep_updated;
2024-12-24T17:28:38.407824875+01:00 [INFO] Enabling Vulkan Portability
2024-12-24T17:28:38.407863739+01:00 [INFO] Enabling color space support
2024-12-24T17:28:38.53860889+01:00 [INFO] Adapter: "NVIDIA GeForce RTX 3060"
2024-12-24T17:28:38.54363976+01:00 [INFO] Ray tracing is supported
2024-12-24T17:28:38.761487943+01:00 [INFO] Using surface present mode FIFO_RELAXED
2024-12-24T17:28:38.761734188+01:00 [WARN] Unable to forbid exclusive full screen
2024-12-24T17:28:38.824620429+01:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-12-24T17:28:38.824670603+01:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-12-24T17:28:38.82470574+01:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-12-24T17:28:38.87123857+01:00 [INFO] Refreshing at 10001 micros
2024-12-24T17:28:38.872502376+01:00 [INFO] Using GPU: GPUSpecs { is_software_emulated: false, device_name: "NVIDIA GeForce RTX 3060", driver_name: "NVIDIA", driver_info: "560.35.03" }
2024-12-24T17:28:38.893334705+01:00 [WARN] GPU frame is out of date
2024-12-24T17:28:38.893389698+01:00 [INFO] XConnected server on 31457287, transport version: 0.0, TRANSPORT_MAX: 20
2024-12-24T17:28:38.894491369+01:00 [INFO] Using surface present mode FIFO_RELAXED
2024-12-24T17:28:38.894841801+01:00 [WARN] Unable to forbid exclusive full screen
2024-12-24T17:28:38.900881185+01:00 [INFO] set status on client 0: Authenticating
2024-12-24T17:28:38.90137609+01:00 [INFO] perform;
2024-12-24T17:28:38.901432376+01:00 [INFO] authenticate;
2024-12-24T17:28:38.901485336+01:00 [INFO] read_command;
2024-12-24T17:28:38.901968649+01:00 [INFO] socket reader;
2024-12-24T17:28:38.907570457+01:00 [INFO] new;
2024-12-24T17:28:38.908289354+01:00 [INFO] keep_updated;
2024-12-24T17:28:38.919860685+01:00 [ERROR] missing field `name` at line 20 column 1
2024-12-24T17:28:38.92173781+01:00 [INFO] set status on client 84084: Connecting
2024-12-24T17:28:38.964250869+01:00 [INFO] Opening main db
2024-12-24T17:28:38.973939955+01:00 [INFO] using project environment variables from CLI. PATH="/home/robin/.local/bin:/home/robin/.cargo/bin:/home/robin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
2024-12-24T17:28:39.132579531+01:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-12-24T17:28:39.497615214+01:00 [INFO] add_connection;
2024-12-24T17:28:39.509736803+01:00 [INFO] set status on client 84084: Connected { peer_id: PeerId { owner_id: 629, id: 4889042 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-12-24T17:29:01.946733242+01:00 [INFO] new;
2024-12-24T17:29:01.947411393+01:00 [INFO] keep_updated;
2024-12-24T17:29:01.948831334+01:00 [ERROR] error reading file "/home/robin/Desktop/simple/build/src" on event: No such file or directory (os error 2)
2024-12-24T17:29:02.049221545+01:00 [ERROR] error reading file "/home/robin/Desktop/simple/build/src" on event: No such file or directory (os error 2)
@mempler mempler added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Dec 24, 2024
@notpeter

This comment was marked as outdated.

@mempler

This comment was marked as outdated.

@notpeter
Copy link
Member

notpeter commented Dec 27, 2024

I can reproduce.
Only on Linux (not macOS).
Only with Trash (not Delete).

Steps:

mkdir /tmp/issue22399
cd $_
mkdir dir1 dir2
touch dir2/banana.txt
ln -s $PWD/dir2/ dir1/banana_bowl
zed .

Right click banana_bowl in project panel and select Trash.

/tmp/issue22399
├── dir1
│   └── banana_bowl -> /tmp/fofoo/dir2/
└── dir2
    └── banana.txt

Thanks for taking the time to detail that out.

@notpeter notpeter added linux project panel Feedback for files tree view good first issue Issue suitable for first-time contributors reproducible Verified steps to reproduce included and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Dec 27, 2024
@notpeter notpeter changed the title [Linux/X64] Deleting a symlink will also trash it's content Linux Trashing a symlink to a directory will trash the target directory not the symlink Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] good first issue Issue suitable for first-time contributors linux project panel Feedback for files tree view reproducible Verified steps to reproduce included
Projects
None yet
Development

No branches or pull requests

2 participants