Browse Source

get_pwd_full() doesn't stop on empty 'line' field

Serj Kalichev 5 years ago
parent
commit
67e3a7add5
1 changed files with 2 additions and 5 deletions
  1. 2 5
      clish/shell/shell_pwd.c

+ 2 - 5
clish/shell/shell_pwd.c

@@ -140,11 +140,8 @@ char *clish_shell__get_pwd_full(const clish_shell_t * this, unsigned int depth)
 	for (i = 1; i <= depth; i++) {
 		const char *str =
 			clish_shell__get_pwd_line(this, i);
-		/* Cannot get full path */
-		if (!str) {
-			lub_string_free(pwd);
-			return NULL;
-		}
+		if (!str)
+			continue;
 		if (pwd)
 			lub_string_cat(&pwd, " ");
 		lub_string_cat(&pwd, "\"");