diff options
| author | Simon 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) |
| commit | d788b15068595aa4295c8366c93b4c022699e09f (patch) | |
| tree | 99d9870794f9ce94ffa0bdffad132d31c3efc1f8 /src/misc.c | |
| parent | 820871e92b549c23ca645f1c959cc5aeb8b19fe5 (diff) | |
| download | powder-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.c | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -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; |
