Skip to content

Instantly share code, notes, and snippets.

@yoshikaw
Created May 7, 2011 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshikaw/960756 to your computer and use it in GitHub Desktop.
Save yoshikaw/960756 to your computer and use it in GitHub Desktop.
pdumpfs 1.3をruby 1.9環境で使うための最低限のパッチ
--- a/pdumpfs.in 2011-05-08 04:21:15.000000000 +0900
+++ b/pdumpfs.in 2011-05-08 04:22:13.000000000 +0900
@@ -48,7 +48,7 @@
#
require 'find'
-require 'ftools'
+require 'fileutils'
require 'getoptlong'
require 'date'
@@ -868,7 +868,7 @@
today = File.join(dest, datedir(start_time), base)
File.umask(0077)
- File.mkpath(today) unless @dry_run
+ FileUtils.mkpath(today) unless @dry_run
if latest
update_snapshot(src, latest, today)
else
@@ -1018,7 +1018,7 @@
case type
when "directory"
- File.mkpath(today)
+ FileUtils.mkpath(today)
when "unchanged"
File.force_link(latest, today)
when "updated"
@@ -1089,7 +1089,7 @@
case type
when "directory"
- File.mkpath(t)
+ FileUtils.mkpath(t)
when "new_file"
copy(s, t)
when "symlink"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment