Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pushed new branch: 0_1_0

git-svn-id: http://bundle-fu.googlecode.com/svn/tags/bundle_fu@15 1db77ec0-6337-0410-9320-454da9aca44f
  • Loading branch information...
commit 1b59544c759d9344fdabf5f009b1fab0c4b1f2bb 2 parents 52a3169 + e9eb36a
timcharper authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/bundle_fu/file_list.rb
View
6 lib/bundle_fu/file_list.rb
@@ -28,7 +28,9 @@ def update_mtimes
def self.open(filename)
return nil unless File.exists?(filename)
b = new
- b.filelist = Marshal.load(File.read(filename))
+ File.open(filename, "rb") {|f|
+ b.filelist = Marshal.load(f) # rescue [])
+ }
b
end
@@ -47,7 +49,7 @@ def add_files(filenames=[])
end
def save_as(filename)
- File.open(filename, "w") {|f| f.puts Marshal.dump(self.filelist)}
+ File.open(filename, "wb") {|f| f.puts Marshal.dump(self.filelist)}
end
protected
def abs_location(filename)
Please sign in to comment.
Something went wrong with that request. Please try again.