Bugs: Browse | Submit New | Admin

[#1034] Compatability issue with sidebar_maker.rb

Date:
2004-11-09 16:59
Priority:
3
Submitted By:
Daniel Berger (djberg96)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Compatability issue with sidebar_maker.rb

Detailed description
Hi James,

I noticed a problem with the sidebar_maker.rb script.

C:\ruby\src\ruby-docbar_0.1.0>ruby sidebar_maker.rb
Creating C:/ruby/src/ruby-docbar_0.1.0/docbar if needed ...
Calling rm -rf C:/ruby/src/ruby-docbar_0.1.0/docbar/*.*
sidebar_maker.rb:119:in ``': No such file or directory - rm -rf C:/ruby/src/ruby
-docbar_0.1.0/docbar/*.* (Errno::ENOENT)
        from sidebar_maker.rb:119:in `clear'
        from sidebar_maker.rb:137

I believe the equivalent to 'rm -rf' on Windows is 'del /S /F'

This seemed to work:

def clear dir
  puts( "Calling rm -rf #{dir}/*.*" )
  if File::ALT_SEPARATOR
    puts `del /S /F #{dir}`
  else
    puts `rm -rf #{dir}/*.*`
  end
end

Regards,

Dan

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item