lib/bagit/manifest.rb in bagit-0.3.0.pre vs lib/bagit/manifest.rb in bagit-0.3.0
- old
+ new
@@ -122,11 +122,10 @@
end
def delete_tag_file(path)
filepath = File.join(@bag_dir, path)
raise "Tag file does not exist: #{path}" unless File.exist? filepath
- #TODO: delete tags even when they are not in the manifest
- remove_tag_file(path)
+ remove_tag_file(path) if tag_files.include?(path)
FileUtils::rm filepath
end
# Returns true if all present manifested files' message digests
# match the actual message digest