|
|
@ -190,6 +190,8 @@ namespace NzbDrone.Common.Disk
|
|
|
|
|
|
|
|
|
|
|
|
var fi = new FileInfo(path);
|
|
|
|
var fi = new FileInfo(path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
// If the file is a symlink, resolve the target path and get the size of the target file.
|
|
|
|
// If the file is a symlink, resolve the target path and get the size of the target file.
|
|
|
|
if (fi.Attributes.HasFlag(FileAttributes.ReparsePoint))
|
|
|
|
if (fi.Attributes.HasFlag(FileAttributes.ReparsePoint))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -200,6 +202,11 @@ namespace NzbDrone.Common.Disk
|
|
|
|
fi = new FileInfo(targetPath);
|
|
|
|
fi = new FileInfo(targetPath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (IOException ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Logger.Trace(ex, "Unable to resolve symlink target for {0}", path);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return fi.Length;
|
|
|
|
return fi.Length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|