<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+* Made AbstractRepository#remove_hidden_folders platform independent
+
 * Fixed loading in sashimi
 
 * Fixed lib loading in sashimi.rb</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -3,4 +3,6 @@ $LOAD_PATH.unshift &quot;#{File.dirname(__FILE__)}/../lib&quot;
 require 'sashimi'
 require 'sashimi/commands'
 
+$rails_app = Dir.pwd
+
 Sashimi::Commands::Command.parse!</diff>
      <filename>bin/sashimi</filename>
    </modified>
    <modified>
      <diff>@@ -58,6 +58,11 @@ module Sashimi
         @@cache_file
       end
 
+      # Return the path to the Rails app where the user launched sashimi command.
+      def path_to_rails_app
+        $rails_app
+      end
+
       # Read the cache file and return the content as an &lt;tt&gt;Hash&lt;/tt&gt;.
       def cache_content
         change_dir_to_local_repository
@@ -166,6 +171,11 @@ module Sashimi
       self.class.plugins_dir
     end
     
+    # Proxy for &lt;tt&gt;AbstractRepository#path_to_rails_app&lt;/tt&gt;
+    def path_to_rails_app
+      self.class.path_to_rails_app
+    end
+    
     # Prepare the plugin installation
     def prepare_installation
       FileUtils.mkdir_p(local_repository_path)
@@ -194,14 +204,21 @@ module Sashimi
     
     # Copy a plugin to a Rails app.
     def copy_plugin_to_rails_app
+      change_dir(path_to_rails_app)
       FileUtils.mkdir_p(plugins_dir)
       FileUtils.cp_r(File.join(local_repository_path, plugin.name), File.join(plugins_dir, plugin.name))
     end
     
     # Remove SCM hidden folders.
-    # TODO: make working on Windows platform.
     def remove_hidden_folders
-      system(%(find vendor/plugins/#{plugin.name} -name &quot;.#{scm_type}&quot; -type d -print | xargs rm -rf {}))
+      require 'find'
+      change_dir(File.join(path_to_rails_app, plugins_dir, plugin.name))
+      Find.find('./') do |path|
+        if File.basename(path) == '.'+scm_type
+          FileUtils.remove_dir(path, true)
+          Find.prune
+        end
+      end
     end
     
     # Run the plugin install hook.</diff>
      <filename>lib/sashimi/repositories/abstract_repository.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c3e5c46f8527e1b69d8b7ac1b3397b44fa716c53</id>
    </parent>
  </parents>
  <author>
    <name>Luca Guidi</name>
    <email>guidi.luca@gmail.com</email>
  </author>
  <url>http://github.com/jodosha/sashimi/commit/a585fd7381db9ba0c3c0062b4a24586fdc39c251</url>
  <id>a585fd7381db9ba0c3c0062b4a24586fdc39c251</id>
  <committed-date>2008-05-19T03:11:06-07:00</committed-date>
  <authored-date>2008-05-19T03:11:06-07:00</authored-date>
  <message>Made AbstractRepository#remove_hidden_folders platform independent</message>
  <tree>624d48c74b03a14d9ce1d55830bd76be941e7744</tree>
  <committer>
    <name>Luca Guidi</name>
    <email>guidi.luca@gmail.com</email>
  </committer>
</commit>
