mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #22882 from overleaf/jpa-file-tree-script
[web] scripts/find_malformed_filetrees: flag missing file hash and folder arrays GitOrigin-RevId: 8561a59856486bd6903f84a99434d0bd81acb175
This commit is contained in:
@@ -29,6 +29,11 @@ async function main() {
|
||||
)
|
||||
} else if (isName(mongoPath)) {
|
||||
modifiedCount = await fixName(projectId, mongoPath)
|
||||
} else if (isHash(mongoPath)) {
|
||||
console.error(`Missing file hash: ${mongoPath}`)
|
||||
console.error('SaaS: likely needs filestore restore')
|
||||
console.error('Server Pro: please reach out to support')
|
||||
process.exit(1)
|
||||
} else {
|
||||
console.error(`Unexpected mongo path: ${mongoPath}`)
|
||||
process.exit(1)
|
||||
@@ -72,6 +77,10 @@ function isName(path) {
|
||||
return /\.name$/.test(path)
|
||||
}
|
||||
|
||||
function isHash(path) {
|
||||
return /\.hash$/.test(path)
|
||||
}
|
||||
|
||||
function parentPath(path) {
|
||||
return path.slice(0, path.lastIndexOf('.'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user