fix metadata dirname