Skip to content

Commit e6e912b

Browse files
committed
bin/xbps-create: exit with error message if lstat for destdir file fails
1 parent de9082f commit e6e912b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bin/xbps-create/main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,8 @@ walk_dir(const char *path,
593593
strncpy(tmp_path, path, PATH_MAX - 1);
594594
strncat(tmp_path, "/", PATH_MAX - 1 - strlen(tmp_path));
595595
strncat(tmp_path, list[i]->d_name, PATH_MAX - 1 - strlen(tmp_path));
596-
if (lstat(tmp_path, &sb) < 0) {
597-
break;
598-
}
596+
if (lstat(tmp_path, &sb) < 0)
597+
die("lstat: %s", tmp_path);
599598

600599
if (S_ISDIR(sb.st_mode)) {
601600
rv = walk_dir(tmp_path, fn);

0 commit comments

Comments
 (0)