From 2ae5a38e1511b1658b67715846e6bb070f096098 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 14 Nov 2013 13:55:40 -0800 Subject: [PATCH] Use forward slashes for CIFS when saving too https://github.com/webmin/webmin/issues/68 --- mount/linux-lib.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mount/linux-lib.pl b/mount/linux-lib.pl index c70d1c145..96f60cd3d 100755 --- a/mount/linux-lib.pl +++ b/mount/linux-lib.pl @@ -247,7 +247,10 @@ foreach (@fstab) { if ($line =~ /\S/ && $line !~ /\signore\s/ && $i++ == $_[0]) { # Found the line to replace local $dev = $_[2]; - $dev =~ s/ /\\040/g; + if ($_[3] eq $smbfs_fs || $_[3] eq "cifs") { + $dev =~ s/\\/\//g; + $dev =~ s/ /\\040/g; + } &print_tempfile(FSTAB, $dev."\t".$_[1]."\t".$_[3]); local @opts = $_[4] eq "-" ? ( ) : split(/,/, $_[4]); if ($_[6] eq "no") { @@ -679,7 +682,7 @@ elsif ($_[2] eq $smbfs_fs || $_[2] eq "cifs") { # SMB filesystem mounted with mount command local $temp = &transname(); local $ex = &system_logged("mount -t $_[2] $opts $qshar $_[0] >$temp 2>&1 /dev/null 2>&1");