Permalink
Browse files

Merge pull request #746 from benmanns/local-file-delete-1.8

[local|storage] Fix Local::File deletion for Ruby 1.8.
  • Loading branch information...
2 parents 0f4841b + 1deb159 commit 122286b3c07935e5ee7c123bef5cdcead1731db8 @geemus geemus committed Feb 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/fog/local/models/storage/file.rb
@@ -50,7 +50,7 @@ def destroy
break
end
pwd = Dir.pwd
- if ::Dir.exists?(dir_path)
+ if ::File.exists?(dir_path) && ::File.directory?(dir_path)
Dir.chdir(dir_path)
if Dir.glob('*').empty?
Dir.rmdir(dir_path)

0 comments on commit 122286b

Please sign in to comment.