QL-Win / QuickLook

Bring macOS “Quick Look” feature to Windows
http://pooi.moe/QuickLook/
GNU General Public License v3.0
17.62k stars 1.09k forks source link

Failed to preview a 7z file with password #595

Closed ytm2004 closed 2 years ago

ytm2004 commented 4 years ago

When I pressed space on a 7z file with password, error occoured. When I conpressed different files into 7z files with password and then previewed them, same error occoured, too. I think it would be better to show a message "You need a password to preview it".

Desktop:

Contents in QuickLook.Exception.Log:

========2020/1/4 星期六 10:39:48========
System.ArgumentNullException: String 引用没有设置为 String 的实例。
参数名: s
   在 System.Text.Encoding.GetBytes(String s)
   在 SharpCompress.Compressors.LZMA.AesDecoderStream..ctor(Stream input, Byte[] info, IPasswordProvider pass, Int64 limit)
   在 SharpCompress.Compressors.LZMA.DecoderRegistry.CreateDecoderStream(CMethodId id, Stream[] inStreams, Byte[] info, IPasswordProvider pass, Int64 limit)
   在 SharpCompress.Compressors.LZMA.DecoderStreamHelper.CreateDecoderStream(Stream[] packStreams, Int64[] packSizes, Stream[] outStreams, CFolder folderInfo, Int32 coderIndex, IPasswordProvider pass)
   在 SharpCompress.Compressors.LZMA.DecoderStreamHelper.CreateDecoderStream(Stream inStream, Int64 startPos, Int64[] packSizes, CFolder folderInfo, IPasswordProvider pass)
   在 SharpCompress.Common.SevenZip.ArchiveReader.ReadAndDecodePackedStreams(Int64 baseOffset, IPasswordProvider pass)
   在 SharpCompress.Common.SevenZip.ArchiveReader.ReadDatabase(IPasswordProvider pass)
   在 SharpCompress.Archives.SevenZip.SevenZipArchive.LoadFactory(Stream stream)
   在 SharpCompress.Archives.SevenZip.SevenZipArchive.<LoadEntries>d__11.MoveNext()
   在 SharpCompress.LazyReadOnlyCollection`1.LazyLoader.MoveNext()
   在 QuickLook.Plugin.ArchiveViewer.ArchiveInfoPanel.LoadItemsFromArchive(String path)
   在 QuickLook.Plugin.ArchiveViewer.ArchiveInfoPanel.<>c__DisplayClass13_0.<BeginLoadArchive>b__0()
rabelux commented 2 years ago

See #327