Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Moved the code that turns rule flags into chars into a new
[rsync/rsync.git]
/
support
/
mnt-excl
diff --git
a/support/mnt-excl
b/support/mnt-excl
index
993180e
..
63d0ad9
100755
(executable)
--- a/
support/mnt-excl
+++ b/
support/mnt-excl
@@
-20,6
+20,7
@@
use strict;
use Cwd 'abs_path';
use strict;
use Cwd 'abs_path';
+my $file = '/proc/mounts';
my $dir = shift || '/';
$dir = abs_path($dir);
$dir =~ s#([^/]*)$##;
my $dir = shift || '/';
$dir = abs_path($dir);
$dir =~ s#([^/]*)$##;
@@
-27,7
+28,7
@@
my $trailing = $1;
$trailing = '' if $trailing eq '.' || !-d "$dir$trailing";
$trailing .= '/' if $trailing ne '';
$trailing = '' if $trailing eq '.' || !-d "$dir$trailing";
$trailing .= '/' if $trailing ne '';
-open(IN,
'/proc/mounts') or die $!
;
+open(IN,
$file) or die "Unable to open $file: $!\n"
;
while (<IN>) {
$_ = (split)[1];
next unless s#^\Q$dir$trailing\E##o && $_ ne '';
while (<IN>) {
$_ = (split)[1];
next unless s#^\Q$dir$trailing\E##o && $_ ne '';