mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
New: reflink support for ZFS
(cherry picked from commit a840bb542362d58006b6cc27affd58ee6b965b80)
This commit is contained in:
parent
d4715f119d
commit
3d52f45b6a
1 changed files with 3 additions and 2 deletions
|
@ -341,10 +341,11 @@ namespace NzbDrone.Common.Disk
|
|||
|
||||
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 @@ namespace NzbDrone.Common.Disk
|
|||
|
||||
if (mode.HasFlag(TransferMode.Move))
|
||||
{
|
||||
if (isBtrfs)
|
||||
if (isBtrfs || isZfs)
|
||||
{
|
||||
if (isSameMount && _diskProvider.TryRenameFile(sourcePath, targetPath))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue