mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Share ignore logic between web and clsi
GitOrigin-RevId: c4ae306413efb71989d2db410c3859cb69b3d5de
This commit is contained in:
parent
d627a0bee9
commit
3fa35ef03a
2 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,10 @@ const { open, realpath } = require('node:fs/promises')
|
|||
const path = require('path')
|
||||
const { NotFoundError } = require('./Errors')
|
||||
|
||||
// NOTE: Updating this list requires a corresponding change in
|
||||
// * services/web/frontend/js/features/pdf-preview/util/file-list.js
|
||||
const ignoreFiles = ['output.fls', 'output.fdb_latexmk']
|
||||
|
||||
function getContentDir(projectId, userId) {
|
||||
let subDir
|
||||
if (userId != null) {
|
||||
|
@ -74,7 +78,10 @@ module.exports = {
|
|||
)
|
||||
|
||||
return outputFiles
|
||||
.filter(({ path }) => path !== 'output.pdf')
|
||||
.filter(
|
||||
// Ignore the pdf and also ignore the files ignored by the frontend.
|
||||
({ path }) => path !== 'output.pdf' && !ignoreFiles.includes(path)
|
||||
)
|
||||
.map(
|
||||
({ path }) => `${contentDir}${OutputCacheManager.path(build, path)}`
|
||||
)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
const topFileTypes = ['bbl', 'gls', 'ind']
|
||||
// NOTE: Updating this list requires a corresponding change in
|
||||
// * services/clsi/app/js/OutputFileArchiveManager.js
|
||||
const ignoreFiles = ['output.fls', 'output.fdb_latexmk']
|
||||
|
||||
export const buildFileList = (
|
||||
|
|
Loading…
Reference in a new issue