mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-11 09:18:20 +03:00
repo: Only open regular files
Otherwise we'll try to open device files with predictably bad consequences.
This commit is contained in:
parent
961b1c80db
commit
aa25334286
@ -193,7 +193,7 @@ ostree_stat_and_checksum_file (int dir_fd, const char *path,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!S_ISLNK(stbuf.st_mode))
|
||||
if (S_ISREG(stbuf.st_mode))
|
||||
{
|
||||
fd = ot_util_open_file_read_at (dir_fd, basename, error);
|
||||
if (fd < 0)
|
||||
|
@ -1096,7 +1096,7 @@ add_one_file_to_tree_and_import (OstreeRepo *self,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
add_one_path_to_tree_and_import (OstreeRepo *self,
|
||||
add_one_path_to_tree_and_import (OstreeRepo *self,
|
||||
const char *base,
|
||||
const char *filename,
|
||||
ParsedTreeData *tree,
|
||||
|
Loading…
Reference in New Issue
Block a user