mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-06 00:17:47 +01:00
New: reflink support for ZFS
This commit is contained in:
parent
8f5d628c55
commit
a840bb5423
1 changed files with 3 additions and 2 deletions
|
|
@ -341,10 +341,11 @@ public TransferMode TransferFile(string sourcePath, string targetPath, TransferM
|
|||
|
||||
var isCifs = targetDriveFormat == "cifs";
|
||||
var isBtrfs = sourceDriveFormat == "btrfs" && targetDriveFormat == "btrfs";
|
||||
var isZfs = sourceDriveFormat == "zfs" && targetDriveFormat == "zfs";
|
||||
|
||||
if (mode.HasFlag(TransferMode.Copy))
|
||||
{
|
||||
if (isBtrfs)
|
||||
if (isBtrfs || isZfs)
|
||||
{
|
||||
if (_diskProvider.TryCreateRefLink(sourcePath, targetPath))
|
||||
{
|
||||
|
|
@ -358,7 +359,7 @@ public TransferMode TransferFile(string sourcePath, string targetPath, TransferM
|
|||
|
||||
if (mode.HasFlag(TransferMode.Move))
|
||||
{
|
||||
if (isBtrfs)
|
||||
if (isBtrfs || isZfs)
|
||||
{
|
||||
if (isSameMount && _diskProvider.TryRenameFile(sourcePath, targetPath))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue