- Activation suppression fichier temp lors d'une erreur pour l'ajout de ceului-ci au SBE

This commit is contained in:
Benjamin 2022-03-19 11:53:26 +01:00
parent 2b7b0a36d5
commit 99835cf73e
2 changed files with 1 additions and 7 deletions

View File

@ -85,8 +85,6 @@ public class SavefileRule extends ProtocolReader {
this.setResultCommand(protocolRep.executeWriter(getContext(), SendfileRule.NAME, this.filename, String.valueOf(encryptedFileSize), fileHash), ResultCmdReceiver.STOREBACKEND); this.setResultCommand(protocolRep.executeWriter(getContext(), SendfileRule.NAME, this.filename, String.valueOf(encryptedFileSize), fileHash), ResultCmdReceiver.STOREBACKEND);
} catch (IOException | SHA.ShaException e) { } catch (IOException | SHA.ShaException e) {
// TODO : Supprimer le fichier
System.out.println("HEYHEYHEYHEYHEY OHOHOH");
this.setResultCommand(protocolRep.executeWriter(getContext(), SaveFileErrorRule.NAME), ResultCmdReceiver.CLIENT); this.setResultCommand(protocolRep.executeWriter(getContext(), SaveFileErrorRule.NAME), ResultCmdReceiver.CLIENT);
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -31,17 +31,13 @@ public class SaveFileErrorRule extends ProtocolWriter {
// Suppression du fichier temporaire dans le stockage du FFE // Suppression du fichier temporaire dans le stockage du FFE
ShaHasher hasher = new ShaHasher(context.getLogin() + "_" + context.getDataString("fileName")); ShaHasher hasher = new ShaHasher(context.getLogin() + "_" + context.getDataString("fileName"));
/*
try { try {
Files.deleteIfExists(Path.of( Files.deleteIfExists(Path.of(
String.format("%s/%s", this.storagePath, String.format("%s/%s", this.storagePath,
hasher.fromSalt(hasher.saltToByte(context.getDataString("fileNameSalt"))) hasher.fromSalt(hasher.saltToByte(context.getDataString("fileNameSalt")))
) )
)); ));
} catch (IOException e) { } catch (IOException e) {}
}
*/
return result; return result;
} }