Skip to content

Commit

Permalink
Hide snapd mount point (#1283)
Browse files Browse the repository at this point in the history
  • Loading branch information
HierraStrunger authored Jul 24, 2023
1 parent 8805fa2 commit b103160
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mailscanner/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ function get_disks()
$mounted_fs = file('/proc/mounts');
foreach ($mounted_fs as $fs_row) {
$drive = preg_split("/[\s]+/", $fs_row);
if ((0 === strpos($drive[0], '/dev/')) && (false === stripos($drive[1], '/chroot/'))) {
if ((0 === strpos($drive[0], '/dev/')) && (false === stripos($drive[1], '/chroot/')) && (false === stripos($drive[1], '/snapd/'))){
$temp_drive['device'] = $drive[0];
$temp_drive['mountpoint'] = $drive[1];
$disks[] = $temp_drive;
Expand All @@ -1559,7 +1559,7 @@ function get_disks()
$data = explode("\n", $data);
foreach ($data as $disk) {
$drive = preg_split("/[\s]+/", $disk);
if ((0 === strpos($drive[0], '/dev/')) && (false === stripos($drive[2], '/chroot/'))) {
if ((0 === strpos($drive[0], '/dev/')) && (false === stripos($drive[2], '/chroot/')) && (false === stripos($drive[2], '/snap/'))){
$temp_drive['device'] = $drive[0];
$temp_drive['mountpoint'] = $drive[2];
$disks[] = $temp_drive;
Expand Down

0 comments on commit b103160

Please sign in to comment.