From: Sasha Sherstnev Date: Fri, 20 Dec 2013 11:36:48 +0000 (+0000) Subject: Fix the problem with the disappearing link to the job archive file X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f5ff26c0e7559553fd6146d25a3ca92eef92b184;p=proteocache.git Fix the problem with the disappearing link to the job archive file --- diff --git a/engine/compbio/engine/archive/ArchivedJob.java b/engine/compbio/engine/archive/ArchivedJob.java index 2c2c2ab..08ec64b 100644 --- a/engine/compbio/engine/archive/ArchivedJob.java +++ b/engine/compbio/engine/archive/ArchivedJob.java @@ -39,6 +39,9 @@ public class ArchivedJob { String resultpath = ph.getProperty("archive.web.dir"); String thefile = ph.getProperty("archive.path") + '/' + jobfilename; String finalpath = ProteoCachePropertyHelperManager.getLocalPath() + resultpath + '/' + jobfilename; + if (Files.isReadable(Paths.get(finalpath))) { + Files.delete(Paths.get(finalpath)); + } if (Files.isReadable(Paths.get(thefile))) { Files.copy(Paths.get(thefile), Paths.get(finalpath)); return resultpath + '/' + jobfilename;