When building filesystem contents test file also include symlinks.

This commit is contained in:
2021-07-09 09:49:59 +01:00
parent 0e23059079
commit da157fe16f

View File

@@ -254,6 +254,11 @@ namespace Aaru.Tests.Filesystems
{
data.Children = BuildDirectory(fs, childPath);
}
else if(stat.Attributes.HasFlag(FileAttributes.Symlink))
{
if(fs.ReadLink(childPath, out string link) == Errno.NoError)
data.LinkTarget = link;
}
else
{
data.MD5 = BuildFile(fs, childPath, stat.Length);