Reorder for consistency with the rest of the code

This commit is contained in:
Frank Denis 2017-12-14 16:12:52 +01:00
parent f384177a3a
commit 139c99a73a

View file

@ -207,12 +207,11 @@ basedir_create_useronly(const char *file)
dir = xstrdup(file); dir = xstrdup(file);
basename = file_basename(dir); basename = file_basename(dir);
if (basename == dir) { if (basename == dir) {
// this is a plain file path relative to CWD
free(dir); free(dir);
return 0; return 0;
} else {
dir[basename - dir - 1] = 0;
} }
dir[basename - dir - 1] = 0;
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
if (*dir == 0 || mkdir(dir, 0700) == 0 || errno == EEXIST) { if (*dir == 0 || mkdir(dir, 0700) == 0 || errno == EEXIST) {
ret = 0; ret = 0;