mtkennerly / shawl

Windows service wrapper for arbitrary commands
MIT License
518 stars 15 forks source link

Logs path unable to handle Ramdisk #53

Open JMyklebust opened 2 months ago

JMyklebust commented 2 months ago

The application is unable to handle placing the log folder on a ramdisk for some reason. It always throws this error: error: invalid value 'R:\StepCA\logs' for '--log-dir <path>': Incorrect function. (os error 1)

Ramdisk is based on ImDisk Ramdisk.

(Also I managed to tap enter and send this without typing anything first time 🤷)

mtkennerly commented 2 months ago

Hi! This seems to be a limitation of Rust itself, actually. I found a few relevant tickets:

Unfortunately, I don't think there's anything I can do for now, but we can leave this open for tracking.

JMyklebust commented 1 month ago

It's probably good to track the issue at least, and it's not super important to me that it gets resolved as I can work around it. However I did take a deeper dive via those links and it seems you can use std::path::absolute in the cases where fs::canonicalize fails?

https://doc.rust-lang.org/std/path/fn.absolute.html