Skip to content

Commit

Permalink
main,win32: don't load configuration files if both HOMEDRIVE and HOME…
Browse files Browse the repository at this point in the history
…PATH are empty

Inspired from the comment submitted by @itchyny in universal-ctags#2384.
  • Loading branch information
masatake committed Dec 23, 2019
1 parent fc533cd commit 610d1fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -3544,9 +3544,11 @@ static char *getConfigAtHomeOnWindows (const char *path,
vStringCatS (windowsHome, homeDrive);
vStringCatS (windowsHome, homePath);

char *tmp = combinePathAndFile (vStringValue(windowsHome), path);
vStringDelete (windowsHome);
char *tmp = vStringIsEmpty (windowsHome)
? NULL
: combinePathAndFile (vStringValue(windowsHome), path);

vStringDelete (windowsHome);
return tmp;
}
return NULL;
Expand Down

0 comments on commit 610d1fe

Please sign in to comment.