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

Switching to the current folder from an archive in another directory #1009

Open
tkzv opened this issue Dec 25, 2023 · 1 comment
Open

Switching to the current folder from an archive in another directory #1009

tkzv opened this issue Dec 25, 2023 · 1 comment

Comments

@tkzv
Copy link

tkzv commented Dec 25, 2023

Describe the bug
When I browse images in a ZIP archive located in another directory, and current directory (where nomacs was started) has files that fit between files from the archive, browsing switches to the current directory.

To Reproduce
Steps to reproduce the behavior:

  1. Create 2 directories: "across1/" and "across2/".
  2. Copy the attached archive "storage2.zip" to "across2/".
  3. Unpack "storage1.zip" to "across1/" without several first files , e.g. "04.webp" to "99.webp".
  4. Unpack "storage1.zip" and "storage2.zip" elsewhere and check the files — the images contain text from "here-01" to "here-99" and from "THERE-01" to "THERE-99" respectively.
  5. In console switch to "across1/" and open "across2/storage2.zip" with nomacs: nomacs ../across2/storage2.zip
  6. Make sure the files are sorted by name in ascending order — "File → Sort → by Filename" and "File → Sort → Ascending" are selected.
  7. Press the right arrow several times. — The image texts change in the following order: "THERE-01", "THERE-02", "THERE-03", "THERE-04", "here-05", "here-06" and so on until "here-99", then "here-04", "here-05"...

Expected behavior
This should display only the images from "storage2.zip" in ascending order. The image text should progress from "THERE-01" through "THERE-05" to "THERE-99" and then again from "THERE-01" to "THERE-99".

Desktop (please complete the following information):

  • OS: Gentoo Linux, kernel 5.15.32-gentoo-r1
  • media-gfx/nomacs-3.16.224-r6, sys-libs/glibc-2.37-r7, dev-qt/qtcore-5.15.11-r1, x11-base/xorg-server-21.1.10-r1

Additional context
Console output while browsing from 01.webp to 0.6.webp:

$ nomacs ../across2/storage2.zip 
[INFO] Hi there
[INFO] plugins dir set to:  "/usr/lib64/nomacs-plugins"
[INFO] local client created in:  3 ms
[INFO] theme loaded from "/usr/share/nomacs/Image Lounge/themes/Light-Theme.css"
[INFO] CSS loaded from:  ":/nomacs/stylesheet.css"
[INFO] Initialization takes:  128 ms
[INFO] [DkImageLoader] 99 containers created in 3 ms
[INFO] [DkImageLoader] after sorting:  3 ms
[INFO] [DkImageLoader] 99 containers created in 3 ms
[INFO] [DkImageLoader] after sorting:  3 ms
[INFO] [Basic Loader] "01.webp" loaded in 4 ms
[WARNING] QMainWindow::addToolBar: invalid 'area' argument
[INFO] [Basic Loader] "02.webp" loaded in 1 ms
[WARNING] QMainWindow::addToolBar: invalid 'area' argument
[INFO] [Basic Loader] "03.webp" loaded in 2 ms
[WARNING] QMainWindow::addToolBar: invalid 'area' argument
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[INFO] [Basic Loader] "04.webp" loaded in 1 ms
[INFO] [DkImageLoader] 96 containers created in 6 ms
[INFO] [DkImageLoader] after sorting:  8 ms
[WARNING] WARNING: image not found for caching!
[INFO] [DkImageLoader] 96 containers created in 1 ms
[INFO] [DkImageLoader] after sorting:  2 ms
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[INFO] [Basic Loader] "/home/tkzv/todo/nomacs/across1/05.webp" loaded in 1 ms
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[INFO] [Basic Loader] "/home/tkzv/todo/nomacs/across1/06.webp" loaded in 1 ms
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[WARNING] Broken filename passed to function
[INFO] [Basic Loader] "/home/tkzv/todo/nomacs/across1/07.webp" loaded in 4 ms

The images were created in ImageMagick with commands:

for n in `seq -w 1 99`; do sem -q -j8 magick -size 100x200 -font DejaVu-Sans-Mono-Book label:here-$n $n.webp; done
for n in `seq -w 1 99`; do sem -q -j8 magick -size 100x200 -font DejaVu-Sans-Mono-Book label:THERE-$n $n.webp; done

storage1.zip
storage2.zip

@scrubbbbs
Copy link
Contributor

This is a duplicate of #475, on that issue you will find a PR you can try out, and please give feedback to help close the PR.

Note you will need to ensure looping is enabled and file association for zip has browse disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants