-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Milestone
Description
Attempting to download a directory which contains a broken symlink causes an exception to be raised and results in a 0 byte file download.
E.g. the following directory can be used for reproducing the issue:
[rkarlsso@blahake dir]$ ls -la
total 10248
drwxr-xr-x. 2 rkarlsso csc 4096 Oct 23 15:05 .
drwxr-xr-x. 4 rkarlsso csc 4096 Oct 23 15:05 ..
-rw-r--r--. 1 rkarlsso csc 10485760 Oct 23 15:05 a_file
lrwxrwxrwx. 1 rkarlsso csc 14 Oct 23 15:05 broken_symlink -> missing_target
Logs:
Started GET "/pun/dev/dashboard/files/fs/home/rkarlsso/ondemand/zipfiletesting/dir?download=1761221139491" for 2001:708:10:10:8521:97bd:882a:81aa at 2025-10-23 12:05:39 +0000
Processing by FilesController#fs as HTML
Parameters: {"download"=>"1761221139491", "fs"=>"fs", "filepath"=>"home/rkarlsso/ondemand/zipfiletesting/dir"}
execve = ["timeout", "5s", "du", "-cbs", "/home/rkarlsso/ondemand/zipfiletesting/dir"]
exception raised when attempting to download directory /home/rkarlsso/ondemand/zipfiletesting/dir: No such file or directory @ rb_check_realpath_internal - /home/rkarlsso/ondemand/zipfiletesting/dir/broken_symlink
Completed 500 Internal Server Error in 13ms (Allocations: 2484)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels