Fixed: Ignore /etc in System disk overview

Co-Authored-By: taloth <taloth@users.noreply.github.com>
pull/431/head
Qstick 7 years ago
parent 674e1196b3
commit 219f7c0f31

@ -106,6 +106,7 @@ namespace NzbDrone.Core.Test.DiskSpace
[TestCase("/var/lib/kubelet")] [TestCase("/var/lib/kubelet")]
[TestCase("/var/lib/docker")] [TestCase("/var/lib/docker")]
[TestCase("/some/place/docker/aufs")] [TestCase("/some/place/docker/aufs")]
[TestCase("/etc/network")]
public void should_not_check_diskspace_for_irrelevant_mounts(string path) public void should_not_check_diskspace_for_irrelevant_mounts(string path)
{ {
var mount = new Mock<IMount>(); var mount = new Mock<IMount>();

@ -20,7 +20,7 @@ namespace NzbDrone.Core.DiskSpace
private readonly IDiskProvider _diskProvider; private readonly IDiskProvider _diskProvider;
private readonly Logger _logger; private readonly Logger _logger;
private static readonly Regex _regexSpecialDrive = new Regex("^/var/lib/(docker|rancher|kubelet)(/|$)|^/boot(/|$)|/docker(/var)?/aufs(/|$)", RegexOptions.Compiled); private static readonly Regex _regexSpecialDrive = new Regex("^/var/lib/(docker|rancher|kubelet)(/|$)|^/(boot|etc)(/|$)|/docker(/var)?/aufs(/|$)", RegexOptions.Compiled);
public DiskSpaceService(IArtistService artistService, IDiskProvider diskProvider, Logger logger) public DiskSpaceService(IArtistService artistService, IDiskProvider diskProvider, Logger logger)
{ {

Loading…
Cancel
Save