ArchivePlugin: pass Path to open()

This commit is contained in:
Max Kellermann
2014-02-08 13:21:50 +01:00
parent 9906daeca7
commit fe7c6fee34
8 changed files with 25 additions and 17 deletions

View File

@@ -20,17 +20,18 @@
#include "config.h"
#include "ArchivePlugin.hxx"
#include "ArchiveFile.hxx"
#include "fs/Path.hxx"
#include "util/Error.hxx"
#include <assert.h>
ArchiveFile *
archive_file_open(const ArchivePlugin *plugin, const char *path,
archive_file_open(const ArchivePlugin *plugin, Path path,
Error &error)
{
assert(plugin != nullptr);
assert(plugin->open != nullptr);
assert(path != nullptr);
assert(!path.IsNull());
ArchiveFile *file = plugin->open(path, error);
assert((file == nullptr) == error.IsDefined());