From 99835cf73e5bb89aaed17470603573601e23b922 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 19 Mar 2022 11:53:26 +0100 Subject: [PATCH] - Activation suppression fichier temp lors d'une erreur pour l'ajout de ceului-ci au SBE --- .../lightcontainer/protocol/rules/reader/SavefileRule.java | 2 -- .../protocol/rules/writer/SaveFileErrorRule.java | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java index 9128f97..634cadf 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java @@ -85,8 +85,6 @@ public class SavefileRule extends ProtocolReader { this.setResultCommand(protocolRep.executeWriter(getContext(), SendfileRule.NAME, this.filename, String.valueOf(encryptedFileSize), fileHash), ResultCmdReceiver.STOREBACKEND); } catch (IOException | SHA.ShaException e) { - // TODO : Supprimer le fichier - System.out.println("HEYHEYHEYHEYHEY OHOHOH"); this.setResultCommand(protocolRep.executeWriter(getContext(), SaveFileErrorRule.NAME), ResultCmdReceiver.CLIENT); e.printStackTrace(); } diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileErrorRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileErrorRule.java index 98a138c..ef9a9b7 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileErrorRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileErrorRule.java @@ -31,17 +31,13 @@ public class SaveFileErrorRule extends ProtocolWriter { // Suppression du fichier temporaire dans le stockage du FFE ShaHasher hasher = new ShaHasher(context.getLogin() + "_" + context.getDataString("fileName")); - /* try { Files.deleteIfExists(Path.of( String.format("%s/%s", this.storagePath, hasher.fromSalt(hasher.saltToByte(context.getDataString("fileNameSalt"))) ) )); - } catch (IOException e) { - } - - */ + } catch (IOException e) {} return result; }