Fix import not working

This commit is contained in:
smoogipoo 2018-08-15 15:49:55 +09:00
parent 4dfb63023f
commit 767c284793
1 changed files with 1 additions and 1 deletions

View File

@ -412,7 +412,7 @@ protected virtual void Populate(TModel model, [CanBeNull] ArchiveReader archive)
private ArchiveReader getReaderFrom(string path)
{
if (ZipUtils.IsZipArchive(path))
return new ZipArchiveReader(Files.Storage.GetStream(path), Path.GetFileName(path));
return new ZipArchiveReader(File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read), Path.GetFileName(path));
if (Directory.Exists(path))
return new LegacyFilesystemReader(path);
throw new InvalidFormatException($"{path} is not a valid archive");