stash icon indicating copy to clipboard operation
stash copied to clipboard

Scan fails on symlinked zip file: not a valid zip file

Open evandeaubl opened this issue 2 years ago • 3 comments

Describe the bug When I symlink a zip file into one of my Stash library directories and do a scan, it is not integrated into the library as a gallery. When you look at the logs, you see a "not a valid zip file" error logged.

Copying the same zip file into the Stash library at the same location and scanning works correctly.

To Reproduce Steps to reproduce the behavior:

  1. Symlink a zip file into one of the active library directories enabled for images
  2. Go to Setttings->Tasks, and select Scan
  3. Go to Settings->Logs, and observe that zip file scan resulted in "not a valid zip file" error
Error scanning zip file "XXXXX.zip": zip: not a valid zip file

Expected behavior Zip file integrated into Stash library as gallery

Stash Version: (from Settings -> About): 0.22.1

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Safari
  • Version: 17.0

evandeaubl avatar Sep 05 '23 01:09 evandeaubl

As far as I know, symlinks are just a link to another location, if that location it's outside your library folders, I don't think stash will be able to index it. You probably should use a hard link instead, wich is more like a mirror.

peresabcod avatar Oct 05 '23 19:10 peresabcod

Same problem on Debian with zip files in symlinks not working with Stash (get error message - not valid zip file while scanning, same file work well when not symlinkes).

Current tested/working hack to resolve this - mount directory with Samba set to resolve symlinks.

Proper fix will be much appreciated!

laurus-lx avatar Jun 05 '24 20:06 laurus-lx

I've managed to reproduce this. It's a bit of an involved fix, so I likely won't fit it into a 0.26.x bugfix.

WithoutPants avatar Jun 06 '24 07:06 WithoutPants