Skip to content

Commit

Permalink
vsclib/chdir: fix SetCurrentDirectoryW() check
Browse files Browse the repository at this point in the history
  • Loading branch information
vs49688 committed Jan 25, 2021
1 parent 8ecb1d0 commit e80f99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vsclib/chdir.c
Expand Up @@ -41,7 +41,7 @@ int vsc_chdira(const char *path, const vsc_allocator_t *a)
if((wpath = vsc_cstrtowstra(path, NULL, CP_UTF8, a)) == NULL)
goto done;

if((dwResult = SetCurrentDirectoryW(wpath))) {
if(!(dwResult = SetCurrentDirectoryW(wpath))) {
switch(GetLastError()) {
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
Expand Down

0 comments on commit e80f99f

Please sign in to comment.