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

add possiblity to add directory to filename templates #39

Open
L0ric0 opened this issue Jan 20, 2020 · 2 comments
Open

add possiblity to add directory to filename templates #39

L0ric0 opened this issue Jan 20, 2020 · 2 comments

Comments

@L0ric0
Copy link

L0ric0 commented Jan 20, 2020

when using the filename option it would be nice if one could inclue / to add another directory which if it doesn't exist is created

@mlj
Copy link
Owner

mlj commented Jan 25, 2020

Except for creating a new directory if it does not already exist, this can be achieved by setting spool for the channel (which has to be the full path name and not a relative one).

So to make this work in a predictable way we woild have to take (1) the global spool directory, or (2) the channel's spool directory if defined, and (3) decide if filename is just a filename or a directory, (4) append the directory to the spool path, and (5) create one or more non-existing directories in the path.

As things stand, castget does not create spool directories if they do not exist. I originally did this on purpose as it is better to get an error if you configure the wrong directory than have a random directory created somewhere.

But this principle may have to change if we add this feature since it will be rather inconsistent to create relative directories from filename but not those from spool. WDYT?

@L0ric0
Copy link
Author

L0ric0 commented Jan 26, 2020

if we wan't to retain the old beavior of the spool directory we could add a config flag to tell castget to create directorys. So by default the errors would be thrown.

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

No branches or pull requests

2 participants