mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-31 17:50:11 +00:00 
			
		
		
		
	Compare zip file exstension case insensitive
Some other filetypes, like office documents, are also zip file. To distinguish these without unpacking them, the file extensions is checked. Fixes: #1365
This commit is contained in:
		| @@ -93,7 +93,7 @@ object ExtractArchive { | ||||
|       archive: Option[RAttachmentArchive] | ||||
|   )(ra: RAttachment, pos: Int, mime: MimeType): F[Extracted] = | ||||
|     mime match { | ||||
|       case MimeType.ZipMatch(_) if ra.name.exists(_.endsWith(".zip")) => | ||||
|       case MimeType.ZipMatch(_) if ra.name.exists(_.toLowerCase.endsWith(".zip")) => | ||||
|         ctx.logger.info(s"Extracting zip archive ${ra.name.getOrElse("<noname>")}.") *> | ||||
|           extractZip(ctx, archive)(ra, pos) | ||||
|             .flatMap(cleanupParents(ctx, ra, archive)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user