https://bugs.kde.org/show_bug.cgi?id=527506

            Bug ID: 527506
           Summary: zip archive mounts turn into regular files when
                    running `ls ..` inside them, breaking dolphin
    Classification: Frameworks and Libraries
           Product: frameworks-kio
      Version First 6.31.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 197422
  --> https://bugs.kde.org/attachment.cgi?id=197422&action=edit
reproducing the bug in terminal

DESCRIPTION
Archives mounted as directories via kio-fuse can turn into regular files again
within the mount when running `ls ..` from within the archive.

STEPS TO REPRODUCE
Gui :
1. Under dolphin settings -> View, enable "Open archives as folders".
2. Double-click any archive in dolphin
3. Open dolphin's built-in terminal by pressing F4 and confirm that it is in
the archive's folder too (output of `pwd` ends in .zip)
4. run `ls ..` in the terminal
5. after a second, dolphin displays a red error bar "Folder
/run/user/1000-kio-fuse-XXXXXX/path/to/archive.zip" (deleted) does not exist".
It then exits the folder.

Terminal :

# Generate test zip
cd /tmp
touch content.txt
zip archive.zip content.txt
# Mount the zip
P=$(qdbus6 org.kde.KIOFuse /org/kde/KIOFuse org.kde.KIOFuse.VFS.mountUrl
"zip:/tmp/archive.zip")
cd "$P"
ls -F #verify content.txt is here
stat -c "%n %i %F" "$P"
ls -F .. | head -n 3 # this breaks it
stat -c "%n %i %F" "$P" #archive.zip is a file now and has new inode
# cleanup
cd /tmp
fusermount3 -u "${P%%/zip/*}"
rm archive.zip content.txt

see results in kio-archive-mount-break-terminal.png attachment

In case this does not work, there is a slightly more sophisticated LLM written
script attached that breaks it reliably

OBSERVED RESULT
Dolphin displays a red error bar "Folder
/run/user/1000-kio-fuse-XXXXXX/path/to/archive.zip" (deleted) does not exist".
It then exits the folder.
Running `stat` on the zip after having ran `ls ..` sees the zip as a file.

EXPECTED RESULT
Dolphin should stay in the zip folder.
The two `stat` commands should print the same.

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux
KDE Plasma Version: 6.8.0
KDE Frameworks Version: 6.31.0
Qt Version: 6.12.0

ADDITIONAL INFORMATION
Affects all types of archives. The "zip" is only in the title for SEO

WHY CARE
Some terminal themes run `ls ..` on every directory change, e.g. the p10k
plugin for zsh that comes preinstalled with CachyOS. This triggers the bug
immediately, making it impossible to enter archives in dolphin while having the
terminal pane open.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to