|
|
|
@ -17,22 +17,26 @@ namespace NzbDrone.Mono.Disk
|
|
|
|
|
private static readonly Logger Logger = NzbDroneLogger.GetLogger(typeof(DiskProvider));
|
|
|
|
|
|
|
|
|
|
private readonly IProcMountProvider _procMountProvider;
|
|
|
|
|
private readonly NzbDrone.Mono.Disk.ISymbolicLinkResolver _symLinkResolver;
|
|
|
|
|
private readonly ISymbLinkResolver _symLinkResolver;
|
|
|
|
|
private readonly Logger _logger;
|
|
|
|
|
|
|
|
|
|
// Mono supports sending -1 for a uint to indicate that the owner or group should not be set
|
|
|
|
|
// `unchecked((uint)-1)` and `uint.MaxValue` are the same thing.
|
|
|
|
|
private const uint UNCHANGED_ID = uint.MaxValue;
|
|
|
|
|
|
|
|
|
|
public DiskProvider(IProcMountProvider procMountProvider, NzbDrone.Mono.Disk.ISymbolicLinkResolver symLinkResolver)
|
|
|
|
|
public DiskProvider(IProcMountProvider procMountProvider, ISymbLinkResolver symLinkResolver, Logger logger)
|
|
|
|
|
{
|
|
|
|
|
_procMountProvider = procMountProvider;
|
|
|
|
|
_symLinkResolver = symLinkResolver;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override IMount GetMount(string path)
|
|
|
|
|
{
|
|
|
|
|
path = _symLinkResolver.GetCompleteRealPath(path);
|
|
|
|
|
path = _symLinkResolver.GetCompletePath(path);
|
|
|
|
|
|
|
|
|
|
_logger.Warn("Testing 123: {0}, {1}", _symLinkResolver, _symLinkResolver.GetType());
|
|
|
|
|
_logger.Debug("Testing");
|
|
|
|
|
return base.GetMount(path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|