mkdir exportdir's parent, if necessary

Tux Paint's export features will fail if the parent
of the export directory didn't exist.  e.g., using the
default (either via XDG or hard-coded fallback) of
"~/Pictures/TuxPaint/", Tux Paint could not export if
"~/Pictures/" didn't exist yet.  It will now try to
mkdir it as well.  h/t Tim Dickson

Updated OPTIONS documents to explain this.

Also, documenting --exportdir in manpage (was missing!)
This commit is contained in:
Bill Kendrick 2021-01-13 22:48:29 -08:00
parent c2a4b9862a
commit c97932606f
9 changed files with 74 additions and 20 deletions

View file

@ -1,7 +1,7 @@
/*
get_fname.h
Copyright (c) 2009 - July 25, 2020
Copyright (c) 2009 - January 13, 2021
http://www.tuxpaint.org/
This program is free software; you can redistribute it and/or modify
@ -34,7 +34,8 @@ enum
/* (See get_fname.c for details) */
DIR_SAVE,
DIR_DATA,
DIR_EXPORT
DIR_EXPORT,
DIR_EXPORT_PARENT
};
char *get_fname(const char *const name, int kind);