From 993d0d1e902858d66be581c6dce8bbb72b7002e7 Mon Sep 17 00:00:00 2001 From: Sweidan Omar Date: Fri, 21 Jan 2022 08:41:31 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32849 --- .../production/AMC/jobs/steps/shared/PBQuery.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/-product/production/AMC/jobs/steps/shared/PBQuery.java b/server/-product/production/AMC/jobs/steps/shared/PBQuery.java index 2b50e30d..b2727da2 100644 --- a/server/-product/production/AMC/jobs/steps/shared/PBQuery.java +++ b/server/-product/production/AMC/jobs/steps/shared/PBQuery.java @@ -223,7 +223,7 @@ public class PBQuery { Path template = getSOAPTemplate(GETCUSTOMVIEW); - if (!template.toFile().exists()) + if (!Files.exists(template)) throw new FileNotFoundException(template.toString()); try { soap = new String(Files.readAllBytes(template)); @@ -276,7 +276,7 @@ public class PBQuery { Path template = getSOAPTemplate(GETMEDIAUSAGEBYUTRANGE); - if (!template.toFile().exists()) + if (!Files.exists(template)) throw new FileNotFoundException(template.toString()); try { @@ -391,11 +391,11 @@ public class PBQuery { boolean found = false; for (Path subtitleDir : this.subsDirectoriesList) { Path source = Paths.get(subtitleDir.toString(), new String[] { subtitleName }); - if (source.toFile().exists()) { + if (Files.exists(source)) { found = true; logger.info(this.subtitleMarker, "Found missing {}", source); Path target = Paths.get(missingSubsRoot.toString(), new String[] { subtitleName }); - if (target.toFile().exists()) + if (Files.exists(target)) logger.info(this.subtitleMarker, "Missing subtitle {} already exists, overriding", target); Files.copy(source, target, new CopyOption[] { StandardCopyOption.REPLACE_EXISTING }); boolean isContentEquals = Arrays.equals(Files.readAllBytes(source), Files.readAllBytes(target)); -- 2.54.0