1.1 --- a/libe2access/lib/src/image.c Thu Feb 17 00:33:14 2022 +0100
1.2 +++ b/libe2access/lib/src/image.c Thu Feb 17 00:37:13 2022 +0100
1.3 @@ -726,10 +726,15 @@
1.4 {
1.5 ext2_ino_t ino;
1.6
1.7 - if (image_find_path(fs, &name, &ino))
1.8 + return image_isdir_by_path(fs, name, &ino);
1.9 +}
1.10 +
1.11 +int image_isdir_by_path(ext2_filsys fs, const char *name, ext2_ino_t *ino)
1.12 +{
1.13 + if (image_find_path(fs, &name, ino))
1.14 return 0;
1.15
1.16 - return _image_isdir(fs, ino);
1.17 + return _image_isdir(fs, *ino);
1.18 }
1.19
1.20 int _image_isfile(ext2_filsys fs, ext2_ino_t ino)
1.21 @@ -746,10 +751,15 @@
1.22 {
1.23 ext2_ino_t ino;
1.24
1.25 - if (image_find_path(fs, &name, &ino))
1.26 + return image_isfile_by_path(fs, name, &ino);
1.27 +}
1.28 +
1.29 +int image_isfile_by_path(ext2_filsys fs, const char *name, ext2_ino_t *ino)
1.30 +{
1.31 + if (image_find_path(fs, &name, ino))
1.32 return 0;
1.33
1.34 - return _image_isfile(fs, ino);
1.35 + return _image_isfile(fs, *ino);
1.36 }
1.37
1.38 /* vim: tabstop=4 expandtab shiftwidth=4