Closed sga-13 closed 1 month ago
a file corresponding to each svg is created, with random names
Where was this file created? Was it in the same directory as the SVG?
Can you record a GIF to show me what happened?
After you removed magick
from your preloaders
and previewers
in yazi.toml
, the problem disappeared, right?
i do not have any preloaders active in my config right now, and for previewers, there is a general rule for images as attached
It seems that this only happens when you use "convert to svg":
pdf2svg = [{ run = 'pdf2svg "$1" "${1%.*}".svg ', orphan = true, desc = "convert to svg", for = "linux" },]
I believe those temporary files are generated by your opener command and are unrelated to Yazi.
i removed pdf2svg, and exported to svg from some external program (xournalpp with keyboard shortcut) and this still occurred
Are you sure you used the pdf2svg
opener after commenting? I didn't see you select it in the interactive menu. When you open a file directly with o
(instead of using O
to open it interactively), it uses your first opener, which in this case is open
:
open = [{ run = '/home/sg/.local/bin/open-all "$@"', orphan = true, desc = "open", for = "linux" },]
What's in your /home/sg/.local/bin/open-all
? What happens if you run /home/sg/.local/bin/open-all /path/to/your-pdf-file
directly in the terminal?
You could also try using Yazi with the default configuration to see if the issue still by mv ~/.config/yazi ~/.config/yazi-backup
.
i have changed the shortcuts for yazi (i use enter to open with default, and o
to open interactive menu)
also, this time, i did not use pdf2svg to convert to svg, i exported via xournalpp, using a keyboard shortcut (Alt + shift + S)
my point is that this behaviour did not use to occur with older yazi version, and following recording is without my configurations
all these files generated without me doing anything, since with fresh config, they probably remake files
i meant cache files
I see now, let's reopen it
Please try disabling the SVG previewer and preloader to see if the issue still by creating an empty yazi.toml
with:
[plugin]
prepend_preloaders = [
{ mime = "image/svg+xml", run = "noop" },
]
prepend_previewers = [
{ mime = "image/svg+xml", run = "noop" },
]
well that "fixes" the files from appearing (at the cost of no preview)
I think the only possible reason is that these files were generated when executing magick
. What happens if you run this command directly from your terminal with your svg filepath?
yes, i was alreading fiddling around that pull request
i tried
convert -density 200 -resize 800x600^ -quality 90 /home/sg/study/sem-7/pyl125/notes-me/reciprocal-lattice-unit-cell-export.svg JPG:/home/sg/study/sem-7/pyl125/notes-me/reciprocal-lattice-unit-cell-export.jpg
and yes it creates those files in $pwd
so we can either ask upstream to look at this, or temporarily take a state of files, check for new files that pop up, and then check if they do have the line, if so, delete them
It's strange that I'm unable to reproduce the issue using the SVG you provided with
magick -density 200 ~/Downloads/355329878-6ac29875-58c9-48bb-9ee0-1ba4e1010dbd.svg -resize 800x600^ -quality 90 JPG:/tmp/aaa.jpg
It doesn't create any temporary files, my version:
❯ magick --version
Version: ImageMagick 7.1.1-36 Q16-HDRI aarch64 22352 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(5.0)
Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png ps raw tiff webp xml zlib zstd
Compiler: gcc (4.2)
I think this might be an issue with Magick itself or possibly with how the distribution packaged it. Could you try downloading the binary from the official website to see if the problem persists?
yes, i tried the appimage, no issues, so, it has nothing to do with yazi or magick, sorry to waste so much of your time
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
foot
yazi --debug
outputWhen reporting a bug, please also upload the
yazi.log
log file - only upload the most recent content by time. You can find it in the "/home/sg/.local/state/yazi" directory.Did you try the latest nightly build to see if the problem got fixed?
No, and I'll explain why below
Describe the bug
I am using the linux gnu release https://github.com/sxyazi/yazi/releases/download/v0.3.0/yazi-x86_64-unknown-linux-gnu.zip
i am on arch linux
I do not have inkscape installed, and whenever i have a new svg file in a directory, or move to a directory with svg files, that i have never been to (ones without cache), a file corresponding to each svg is created, with random names (i have attached a zip, which has 41 such files). These files contain only 1 line
sh: 1: inkscape: not found
As i understand, these must be some temporary files used in preloader/ or to generate preview, and these may be used in case where you have inkscape, or maybe there is some case where inkscape is used to generate some preview, and these are error files generated in case that process failsFor reference, previews for svg files is working
I have also attached 1 such file separately, and also my yazi.toml (had to add .txt in the end because of github), i have all preloaders commented in my yazi.toml after updating to 0.3+, this error did not occur with previous versions
err.zip p_+__W.txt yazi.toml.txt
yazi.log
Minimal reproducer
have a svg file present in a directory with no previous cache, or a fresh svg file, i have also attached a sample svg file for testing
Anything else?
No response