summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-09-27 11:49:11 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-09-27 11:49:11 (GMT)
commitd788b15068595aa4295c8366c93b4c022699e09f (patch)
tree99d9870794f9ce94ffa0bdffad132d31c3efc1f8 /src/misc.c
parent820871e92b549c23ca645f1c959cc5aeb8b19fe5 (diff)
downloadpowder-d788b15068595aa4295c8366c93b4c022699e09f.zip
powder-d788b15068595aa4295c8366c93b4c022699e09f.tar.gz
Ensure installation doesn't fail if directory already exists
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/misc.c b/src/misc.c
index 6a7d732..f9cb5a3 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -504,25 +504,9 @@ int register_extension()
if((strlen(AppDataPath)+strlen(APPDATA_SUBDIR "\\Powder Toy"))<MAX_PATH)
{
strappend(AppDataPath, APPDATA_SUBDIR);
-#ifdef WIN32
- if(_mkdir(AppDataPath))
-#else
- if(mkdir(AppDataPath, 0755))
-#endif
- {
- returnval = 0;
- goto finalise;
- }
+ _mkdir(AppDataPath);
strappend(AppDataPath, "\\Powder Toy");
-#ifdef WIN32
- if(_mkdir(AppDataPath))
-#else
- if(mkdir(AppDataPath, 0755))
-#endif
- {
- returnval = 0;
- goto finalise;
- }
+ _mkdir(AppDataPath);
} else {
returnval = 0;
goto finalise;