中英双语

This commit is contained in:
tianmo committed 2026-10-22 18:13:43 +08:00
1 parent ea26af26ee
commit b98c0333e6
50 files changed
+4082 -2049

No files matched your search

+3 -1
View File
@@ -1,3 +1,5 @@
import { translate } from '../i18n'
export interface ZipArchiveFile {
name: string
data: Uint8Array
@@ -17,7 +19,7 @@ function crc32(data: Uint8Array) {
function safeArchivePath(value: string) {
const parts = String(value || '').replace(/\\/g, '/').split('/').filter((part) => part && part !== '.')
if (!parts.length || parts.some((part) => part === '..')) throw new Error('ZIP 文件路径无效')
if (!parts.length || parts.some((part) => part === '..')) throw new Error(translate('errors.invalidZipPath'))
return parts.join('/')
}