/[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 20 by dpavlin, Mon Jul 9 16:20:07 2007 UTC revision 21 by dpavlin, Mon Jul 9 17:35:26 2007 UTC
# Line 162  sub x_open { Line 162  sub x_open {
162                  file_copy( '<:gzip', $path, '>', $tmp );                  file_copy( '<:gzip', $path, '>', $tmp );
163                  $path = $tmp;                  $path = $tmp;
164          }          }
         warn "<<< open abs path: $path [", -e $path ? -s $path : 'new' , "]\n";  
         return -$! unless sysopen($fh , $path, $mode);  
         close($fh);  
165    
166          $pending->{$file}->{path} = $path;          if ( sysopen($fh , $path, $mode) ) {
167          return 0;                  close($fh) || confess "can't close $path: $!";
168                    warn "<<< open $path [", -e $path ? -s $path : 'new' , "]\n";
169                    $pending->{$file}->{path} = $path;
170                    return 0;
171            } else {
172                    warn "ERROR: can't open $path : $!";
173                    return -$!;
174            }
175    
176  }  }
177    
178  sub x_read {  sub x_read {
# Line 274  sub x_truncate { Line 279  sub x_truncate {
279                  $no_gz =~ s/\.gz$//;                  $no_gz =~ s/\.gz$//;
280                  rename $path, $no_gz || confess "can't rename $path -> $no_gz: $!";                  rename $path, $no_gz || confess "can't rename $path -> $no_gz: $!";
281          }          }
282          warn "## truncate( $file $size ) $path [", -s $path, "]\n";          warn "## truncate( $file $size ) $path [", -s $path, "] = $rv\n" if $debug;
283          $pending->{$file}->{write}++;          $pending->{$file}->{write}++;
284          return $rv;          return $rv;
285  }  }

Legend:
Removed from v.20  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26