/[fuse-comp]/fuse-comp.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /fuse-comp.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by dpavlin, Mon Jul 9 13:45:53 2007 UTC revision 18 by dpavlin, Mon Jul 9 15:41:01 2007 UTC
# Line 164  sub x_open { Line 164  sub x_open {
164          }          }
165          warn ">>> open abs path: $path [", -e $path ? -s $path : 'new' , "]\n";          warn ">>> open abs path: $path [", -e $path ? -s $path : 'new' , "]\n";
166          return -$! unless sysopen($fh , $path, $mode);          return -$! unless sysopen($fh , $path, $mode);
         warn ">>> after open [",-s $path, "]\n";  
167          close($fh);          close($fh);
168    
169          $pending->{$file}->{path} = $path;          $pending->{$file}->{path} = $path;
# Line 219  sub x_unlink   { return unlink_all( shif Line 218  sub x_unlink   { return unlink_all( shif
218  sub x_symlink { return symlink(shift,fixup(shift)) ? 0 : -$!; }  sub x_symlink { return symlink(shift,fixup(shift)) ? 0 : -$!; }
219    
220  sub x_rename {  sub x_rename {
221          my ($old) = fixup(shift);          my ($old,$new) = @_;
222          my ($new) = fixup(shift);          my $old_path = fixup($old);
223          my ($err) = rename($old,$new) ? 0 : -ENOENT();          my $new_path = fixup($new);
224            $new_path .= '.gz' if ( $old_path =~ m/\.gz$/ && $new_path !~ m/\.gz$/ );
225    
226            my $err = rename($old_path,$new_path) ? 0 : -ENOENT();
227            warn "## rename( $old_path => $new_path ) = $err\n";
228    
229            my $tmp = $mount->{tmp} . '/' . $old;
230            if ( -e $tmp ) {
231                    my $new_tmp = $mount->{tmp} . '/' . $new;
232                    rename $tmp, $new_tmp || confess "can't rename $tmp -> $new_tmp : $!";
233            }
234    
235          return $err;          return $err;
236  }  }
237  sub x_link { return link(fixup(shift),fixup(shift)) ? 0 : -$! }  sub x_link { return link(fixup(shift),fixup(shift)) ? 0 : -$! }

Legend:
Removed from v.17  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26