Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not clean the downloads #37

Open
dazza-codes opened this issue May 5, 2017 · 1 comment
Open

Do not clean the downloads #37

dazza-codes opened this issue May 5, 2017 · 1 comment

Comments

@dazza-codes
Copy link
Contributor

Current behavior:

$ ls -l ~/tmp/fcrepo_wrapper/
total 47M
-rw-r--r-- 1 dlweber users 47M May  5 13:04 fcrepo-webapp-4.7.1-jetty-console.jar
-rw-r--r-- 1 dlweber users  71 May  5 13:04 fcrepo-webapp-4.7.1-jetty-console.jar.md5

$ cat ~/.fcrepo_wrapper 
download_dir: /users/dlweber/tmp/fcrepo_wrapper

$ cat .fcrepo_wrapper 
port: 8984
enable_jms: false

$ fcrepo_wrapper clean
cleaning /tmp/fcrepo-webapp-4.7.1-jetty-console...

$ ls -l ~/tmp/fcrepo_wrapper/
total 0
@dazza-codes
Copy link
Contributor Author

dazza-codes commented May 5, 2017

https://github.com/cbeer/fcrepo_wrapper/blob/master/lib/fcrepo_wrapper/instance.rb#L154-L161

    def clean!
      stop
      remove_instance_dir!
      FileUtils.remove_entry(config.download_path) if File.exists?(config.download_path)
      FileUtils.remove_entry(config.tmp_save_dir, true) if File.exists? config.tmp_save_dir
      md5.clean!
      FileUtils.remove_entry(config.version_file) if File.exists? config.version_file
  end

change to:

    def clean!
      stop
      remove_instance_dir!
      FileUtils.remove_entry(config.tmp_save_dir, true) if File.exists? config.tmp_save_dir
      md5.clean!
      FileUtils.remove_entry(config.version_file) if File.exists? config.version_file
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant