phillbush / xfiles

Configurable and simple file manager for X11
MIT License
97 stars 3 forks source link

thumbnailing will fail if thumbnaildir does not exist #26

Closed apprehensions closed 1 year ago

apprehensions commented 1 year ago

tl;dr

export XFILES_THUMBNAILDIR=/home/wael/.cache/xfiles
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
convert: unable to open image '/home/wael/.cache/xfiles/%foo%bar%baz.jpg.ppm': No such file or directory @ error/blob.c/OpenBlob/3570.
apprehensions commented 1 year ago

the real problem: XFILES_THUMBNAILDIR directory not being created, i guess xfiles should create this?

phillbush commented 1 year ago

The thumbnail directory is created at the beginning of xfiles invocation.

The directory existence is not checked thereafter, so if the user deletes it while XFiles is running, the same errors will occur. I could try to check for the directory existence before each call to the thumbnailing commands, but that would slow the thumbnailer thread down, and make thumbnail loading less smooth.

I think that just a single check, at program invocation, is enough.