You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rfuse-1.0.3
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] on debian squeeze
I'm currently trying to implement a fuse-filesystem in ruby and stubled upon your fine gem.
It work's find most of the time but fails on the file-read-operation, if the contents of the file
contains NULL bytes:
def read(ctx,path,size,offset,fi)
s=IO.read("/tmp/temp.tar",size,offset)
return s
end
The contents end at the first NULL byte. What I wanted to do is some virtual, read/only fs which simulates
TAR archives for subdirectories.
Can you help me?
The text was updated successfully, but these errors were encountered:
This spec passes on both 1.8.7 (p302 and p358) and 1.9.3
it"should read over null characters in a real file"dofile_stat.size=12File.open("/tmp/nulltest","w"){ |f| f.print"hello\000world\000"}mockfs.stub(:getattr).with(anything(),"/testnull").and_return(file_stat)mockfs.stub(:read){ |ctx,path,size,offset,ffi|
IO.read("/tmp/nulltest",size,offset)}with_fuse(mountpoint,mockfs)doFile.open("#{mountpoint}/testnull")do |f|
val=f.getsval.should == "hello\000world\000"val.size.should == 12putsvalendendend
Are you running your fs via RFuse::FuseDelegator? - if so you can run ruby with -debug (or just set $DEBUG = true somewhere). This will output to $stderr the rfuse methods and arguments as they are called.
If you are subclassing RFuse::Fuse directly then I suggest refactoring to use FuseDelegator :-)
Also passing the mount option "-odebug" will cause the Fuse library itself to output debugging statements
If you could do that and attach the output somewhere that will help.
rfuse-1.0.3
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] on debian squeeze
I'm currently trying to implement a fuse-filesystem in ruby and stubled upon your fine gem.
It work's find most of the time but fails on the file-read-operation, if the contents of the file
contains NULL bytes:
def read(ctx,path,size,offset,fi)
s=IO.read("/tmp/temp.tar",size,offset)
return s
end
The contents end at the first NULL byte. What I wanted to do is some virtual, read/only fs which simulates
TAR archives for subdirectories.
Can you help me?
The text was updated successfully, but these errors were encountered: