projects
/
cumulus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfix for restore.pl.
[cumulus.git]
/
restore.pl
diff --git
a/restore.pl
b/restore.pl
index
be94078
..
53b48dc
100755
(executable)
--- a/
restore.pl
+++ b/
restore.pl
@@
-166,7
+166,7
@@
sub iterate_objects {
next if $obj eq "";
if ($obj =~ /^@(\S+)$/) {
my $indirect = load_ref($1);
next if $obj eq "";
if ($obj =~ /^@(\S+)$/) {
my $indirect = load_ref($1);
- iterate_objects($callback, $arg, $
1
, $recursion_level + 1);
+ iterate_objects($callback, $arg, $
indirect
, $recursion_level + 1);
} else {
&$callback($arg, $obj);
}
} else {
&$callback($arg, $obj);
}
@@
-272,8
+272,14
@@
sub process_file {
my $uid = -1;
my $gid = -1;
my $uid = -1;
my $gid = -1;
- $uid = $info{user} + 0 if defined $info{user};
- $gid = $info{group} + 0 if defined $info{group};
+ if (defined $info{user}) {
+ my @items = split /\s/, $info{user};
+ $uid = $items[0] + 0 if exists $items[0];
+ }
+ if (defined $info{group}) {
+ my @items = split /\s/, $info{group};
+ $gid = $items[0] + 0 if exists $items[0];
+ }
chown $uid, $gid, $dest
or warn "Unable to change ownership for $dest";
chown $uid, $gid, $dest
or warn "Unable to change ownership for $dest";