Makes our tuxpaint dir (in case it doesn't exist yet) before writing lockfile
This commit is contained in:
parent
b3239fcc61
commit
aead0632b9
2 changed files with 14 additions and 5 deletions
|
|
@ -121,6 +121,9 @@ http://www.newbreedsoftware.com/tuxpaint/
|
||||||
(on Linux/Mac/BeOS); helps sound under Linux on Mac hardware.
|
(on Linux/Mac/BeOS); helps sound under Linux on Mac hardware.
|
||||||
Albert Cahalan <albert@users.sourceforge.net>
|
Albert Cahalan <albert@users.sourceforge.net>
|
||||||
|
|
||||||
|
* Made sure user directory existed before trying to create lockfile
|
||||||
|
(it might not be there the very first time we run Tux Paint).
|
||||||
|
|
||||||
* Interface improvements:
|
* Interface improvements:
|
||||||
-----------------------
|
-----------------------
|
||||||
* Middle and right mouse buttons no longer do anything.
|
* Middle and right mouse buttons no longer do anything.
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
(See COPYING.txt)
|
(See COPYING.txt)
|
||||||
|
|
||||||
June 14, 2002 - February 13, 2005
|
June 14, 2002 - March 10, 2005
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define VER_VERSION "0.9.15"
|
#define VER_VERSION "0.9.15"
|
||||||
#define VER_DATE "2005-02-13"
|
#define VER_DATE "2005-03-10"
|
||||||
|
|
||||||
|
|
||||||
/* Color depth for Tux Paint to run in, and store canvases in: */
|
/* Color depth for Tux Paint to run in, and store canvases in: */
|
||||||
|
|
@ -7715,6 +7715,7 @@ static void setup(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
char * lock_fname;
|
char * lock_fname;
|
||||||
time_t time_lock, time_now;
|
time_t time_lock, time_now;
|
||||||
|
char * homedirdir;
|
||||||
|
|
||||||
|
|
||||||
/* Get the current time: */
|
/* Get the current time: */
|
||||||
|
|
@ -7753,6 +7754,12 @@ static void setup(int argc, char * argv[])
|
||||||
|
|
||||||
/* Okay to run; create/update the lockfile */
|
/* Okay to run; create/update the lockfile */
|
||||||
|
|
||||||
|
/* (Make sure the directory exists, first!) */
|
||||||
|
homedirdir = get_fname("");
|
||||||
|
mkdir(homedirdir, 0755);
|
||||||
|
free(homedirdir);
|
||||||
|
|
||||||
|
|
||||||
fi = fopen(lock_fname, "w");
|
fi = fopen(lock_fname, "w");
|
||||||
if (fi != NULL)
|
if (fi != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -11464,9 +11471,8 @@ static char * get_fname(const char * const name)
|
||||||
strcpy(f, savedir);
|
strcpy(f, savedir);
|
||||||
else
|
else
|
||||||
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
snprintf(f, sizeof(f), "%s/%s", savedir, name);
|
||||||
#else
|
|
||||||
/* On Mac, Linux and other Unixes, it's in a place under our home dir.: */
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
/* Macintosh: It's under ~/Library/Application Support/TuxPaint */
|
/* Macintosh: It's under ~/Library/Application Support/TuxPaint */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue