修复了图片解密失败的问题

This commit is contained in:
ace
2026-02-27 11:07:54 +08:00
parent 7365831ec1
commit ec0eb64ffd
9 changed files with 522 additions and 267 deletions

View File

@@ -77,7 +77,8 @@ export class DbPathService {
return (
existsSync(join(entryPath, 'db_storage')) ||
existsSync(join(entryPath, 'FileStorage', 'Image')) ||
existsSync(join(entryPath, 'FileStorage', 'Image2'))
existsSync(join(entryPath, 'FileStorage', 'Image2')) ||
existsSync(join(entryPath, 'msg', 'attach'))
)
}
@@ -94,22 +95,21 @@ export class DbPathService {
const accountStat = statSync(entryPath)
let latest = accountStat.mtimeMs
const dbPath = join(entryPath, 'db_storage')
if (existsSync(dbPath)) {
const dbStat = statSync(dbPath)
latest = Math.max(latest, dbStat.mtimeMs)
}
const checkSubDirs = [
'db_storage',
join('FileStorage', 'Image'),
join('FileStorage', 'Image2'),
join('msg', 'attach')
]
const imagePath = join(entryPath, 'FileStorage', 'Image')
if (existsSync(imagePath)) {
const imageStat = statSync(imagePath)
latest = Math.max(latest, imageStat.mtimeMs)
}
const image2Path = join(entryPath, 'FileStorage', 'Image2')
if (existsSync(image2Path)) {
const image2Stat = statSync(image2Path)
latest = Math.max(latest, image2Stat.mtimeMs)
for (const sub of checkSubDirs) {
const fullPath = join(entryPath, sub)
if (existsSync(fullPath)) {
try {
const s = statSync(fullPath)
latest = Math.max(latest, s.mtimeMs)
} catch { }
}
}
return latest