Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

The Chinese file names in the ZIP file are "??????? ". #44

Open
chaofan2685 opened this issue Jul 11, 2020 · 1 comment
Open

The Chinese file names in the ZIP file are "??????? ". #44

chaofan2685 opened this issue Jul 11, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@chaofan2685
Copy link

UlsM9g.png

@chaofan2685 chaofan2685 added the bug Something isn't working label Jul 11, 2020
@Naeemo
Copy link

Naeemo commented Jul 28, 2020

It's probably because of /usr/local/zipinfo.


Inside QLPlugin/Views/Previews/ZIPPreview.swift:

	private func runZIPInfoCommand(filePath: String) throws -> String {
		do {
			let result = try exec(
				program: "/usr/bin/zipinfo",
				arguments: [filePath]
			)
			return result.stdout ?? ""
		} catch {
			// Empty ZIP files are allowed, but return exit code 1
			let error = error as! ExecError
			let stdout = error.execResult.stdout ?? ""
			if error.execResult.exitCode == 1, stdout.hasSuffix("Empty zipfile.") {
				return stdout
			}
			throw error
		}
	}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants