From 0930b1cd8f4f2a8c3dca70fe406c419746a45648 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 26 Sep 2017 09:47:29 +0100 Subject: [PATCH] only exclude clsi-specific files from output list --- app/coffee/OutputFileFinder.coffee | 6 ++++-- app/coffee/ResourceWriter.coffee | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/coffee/OutputFileFinder.coffee b/app/coffee/OutputFileFinder.coffee index 80bd07f..4b07f6e 100644 --- a/app/coffee/OutputFileFinder.coffee +++ b/app/coffee/OutputFileFinder.coffee @@ -29,8 +29,10 @@ module.exports = OutputFileFinder = callback = (error, fileList) -> _callback(error, fileList) _callback = () -> - - args = [directory, "-name", ".*", "-prune", "-o", "-type", "f", "-print"] + + # don't include clsi-specific files/directories in the output list + EXCLUDE_DIRS = ["-name", ".cache", "-o", "-name", ".archive","-o", "-name", ".project-*"] + args = [directory, "(", EXCLUDE_DIRS..., ")", "-prune", "-o", "-type", "f", "-print"] logger.log args: args, "running find command" proc = spawn("find", args) diff --git a/app/coffee/ResourceWriter.coffee b/app/coffee/ResourceWriter.coffee index f9e90b0..55970ee 100644 --- a/app/coffee/ResourceWriter.coffee +++ b/app/coffee/ResourceWriter.coffee @@ -78,8 +78,6 @@ module.exports = ResourceWriter = should_delete = true if path.match(/^output\./) or path.match(/\.aux$/) or path.match(/^cache\//) # knitr cache should_delete = false - if path == '.project-sync-state' - should_delete = false if path == "output.pdf" or path == "output.dvi" or path == "output.log" or path == "output.xdv" should_delete = true if path == "output.tex" # created by TikzManager if present in output files