From: Sweidan Omar Date: Fri, 21 Jan 2022 08:40:53 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=813be56106686f1258915482f97f5d317c75adc5;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32848 --- diff --git a/server/-product/production/AMC/jobs/steps/shared/EscortFiles.java b/server/-product/production/AMC/jobs/steps/shared/EscortFiles.java index da308d3c..d579ca5d 100644 --- a/server/-product/production/AMC/jobs/steps/shared/EscortFiles.java +++ b/server/-product/production/AMC/jobs/steps/shared/EscortFiles.java @@ -234,7 +234,7 @@ public class EscortFiles { public static boolean isCatchedFileExists(Path escortFile) { Path catchedFilePath = Paths.get(escortFile.toString() + DOT_CATCHED); - return catchedFilePath.toFile().exists(); + return Files.exists(catchedFilePath); } /*** @@ -245,19 +245,19 @@ public class EscortFiles { */ public static boolean isMediaCatched(Path mediaFile) { Path catchedFile = createMediaCathFilePath(mediaFile); - return catchedFile.toFile().exists(); + return Files.exists(catchedFile); } public static boolean isMetadataExists(String filePath, String fileName) throws IOException { boolean result = false; String metadataFileName = fileName + DOT_JSON; Path metadataPath = Paths.get(filePath, STATUSFOLDER, metadataFileName); - result = metadataPath.toFile().exists(); + result = Files.exists(metadataPath); return result; } public static void notifyRecipient(Path escortFile, Logger logger, Message msg) { - if (escortFile.toFile().exists()) { + if (Files.exists(escortFile)) { try { BasicDBObject downloadable = EscortFiles.decode(escortFile); String recipientKey = "recipient";