From 0abc95ca22a4807207ec9471c393b0a934698dbe Mon Sep 17 00:00:00 2001 From: Carlos Alberto Date: Sun, 5 Jun 2016 22:57:47 -0300 Subject: [PATCH] Alteração do tratamento de diretórios na classe GedFileService para funcionar em Linux --- cit-core/src/main/java/br/com/centralit/framework/service/arquitetura/GedFileServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cit-core/src/main/java/br/com/centralit/framework/service/arquitetura/GedFileServiceImpl.java b/cit-core/src/main/java/br/com/centralit/framework/service/arquitetura/GedFileServiceImpl.java index 609acf3..dd824a5 100644 --- a/cit-core/src/main/java/br/com/centralit/framework/service/arquitetura/GedFileServiceImpl.java +++ b/cit-core/src/main/java/br/com/centralit/framework/service/arquitetura/GedFileServiceImpl.java @@ -98,8 +98,8 @@ public class GedFileServiceImpl implements GedFileService { // CRIA A INSTANCIA DE FILEENCRYPTION this.getFileEncryption(); - File encryptedFile = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey() - + "\\" + documento.getDocumentKey() + "-" + documento.getVersionKey()); + File encryptedFile = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey() + + "/" + documento.getDocumentKey() + "-" + documento.getVersionKey()); File file = convertMultiPartToFile(documento); @@ -123,10 +123,10 @@ public class GedFileServiceImpl implements GedFileService { // CRIA A INSTANCIA DE FILEENCRYPTION this.getFileEncryption(); - File encryptedFile = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey() - + "\\" + documento.getDocumentKey() + "-" + documento.getVersionKey()); - File unencryptedFile = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey() - + "\\unencryptedFile.tmp"); + File encryptedFile = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey() + + "/" + documento.getDocumentKey() + "-" + documento.getVersionKey()); + File unencryptedFile = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey() + + "/unencryptedFile.tmp"); fileEncryption.loadKey(encryptedKeyFile, privateKeyFile); fileEncryption.decrypt(encryptedFile, unencryptedFile); @@ -166,7 +166,7 @@ public class GedFileServiceImpl implements GedFileService { @Override public void remove(DocumentoGedInterface documento) throws Exception { - File file = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey() + "\\" + documento.getDocumentKey() + "-" + documento.getVersionKey()); + File file = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey() + "/" + documento.getDocumentKey() + "-" + documento.getVersionKey()); file.delete(); } } -- libgit2 0.21.2