Closed trien255 closed 1 year ago
maybe saving the images in /tmp/catppuccinifier is not a good idea? since you need root permissions to write to that directory. you could provide the option to change the path images are saved to.
Are you using a normal distro or are you using an immutable one? If it's a normal one it shouldn't require root for it.
I actually thought it saved the image to /tmp, when the actual problem with permissions was that it could only take an absolute path to the file. it might be that it is not able to tell what the parent directory of the given file is, and for your question, I am using Archlinux. edit: I have tested it, and I was right the program is not able to find the parent directory somehow
I actually thought it saved the image to /tmp, when the actual problem with permissions was that it could only take an absolute path to the file. it might be that it is not able to tell what the parent directory of the given file is, and for your question, I am using Archlinux. edit: I have tested it, and I was right the program is not able to find the parent directory somehow
Do any of the folders have spaces? I might have to report that to the lutgen crate
fixed it. I just used fs::canonicalize
to get the absolute path and then stored its parent. as it was seemingly struggling with getting the parent directory of a relative path (note that I have not tested the issue in windows)
fn main() {
let cli = Cli::parse();
let image_path = cli.image.to_str().unwrap();
let bind_to_parent = fs::canonicalize(&cli.image).unwrap();
let image_folder = bind_to_parent.parent().unwrap();
Awesome. On the next release i will add that
That is good to hear. I guess I will close the issue now
maybe saving the images in /tmp/catppuccinifier is not a good idea? since you need root permissions to write to that directory. you could provide the option to change the path images are saved to.