Skip to content

Commit

Permalink
Merge pull request AvaloniaUI#3345 from AvaloniaUI/fixes/filter-snap-…
Browse files Browse the repository at this point in the history
…dir-linux

Exclude snap directories in Managed Dialogs volume enumeration
  • Loading branch information
danwalmsley authored Dec 12, 2019
2 parents 101c54f + 769a27e commit 9e34731
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Avalonia.FreeDesktop/LinuxMountedVolumeInfoListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ private void Poll(long _)

var fProcMounts = File.ReadAllLines(ProcMountsDir)
.Select(x => x.Split(' '))
.Select(x => (x[0], x[1]));
.Select(x => (x[0], x[1]))
.Where(x => !x.Item2.StartsWith("/snap/", StringComparison.InvariantCultureIgnoreCase));

var labelDirEnum = Directory.Exists(DevByLabelDir) ?
new DirectoryInfo(DevByLabelDir).GetFiles() : Enumerable.Empty<FileInfo>();
Expand Down

0 comments on commit 9e34731

Please sign in to comment.