Do not clean the downloads
dazza-codes opened this issue · 1 comments
dazza-codes commented
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 commented
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