diff --git a/src/backends/weird.cr b/src/backends/weird.cr index 8034b0e..719582b 100644 --- a/src/backends/weird.cr +++ b/src/backends/weird.cr @@ -60,15 +60,17 @@ class WeirdBackend < Package::Backend::Packaging Dir.cd package.fake_root_directory FileUtils.find "." do |path| + file = path.lchop + if File.symlink? path - manifest.puts [path, "symlink", File.readlink(path)].join ':' + manifest.puts [file, "symlink", File.readlink(path)].join ':' elsif File.directory? path - manifest.puts [path, "directory"].join ':' + manifest.puts [file, "directory"].join ':' elsif File.info?(path).try &.file? digest = OpenSSL::Digest.new("sha256").file(path).hexdigest - manifest.puts [path, "file", digest].join ':' + manifest.puts [file, "file", digest].join ':' else - manifest.puts [path, "other"].join ':' + manifest.puts [file, "other"].join ':' end end