1
1
mirror of https://github.com/jarun/nnn.git synced 2024-11-11 14:44:20 +03:00

Only use the environment variable when it is not empty

This commit is contained in:
sin 2015-11-26 15:10:12 +00:00
parent b77477d377
commit 16109053f5

View File

@ -203,7 +203,7 @@ xgetenv(char *name, char *fallback)
if (name == NULL)
return fallback;
value = getenv(name);
return value ? value : fallback;
return value && value[0] ? value : fallback;
}
char *