diff --git a/app/src/main/java/lightcontainer/protocol/StandardizedDefinitions.java b/app/src/main/java/lightcontainer/protocol/StandardizedDefinitions.java index 4bb0058..c7b449b 100644 --- a/app/src/main/java/lightcontainer/protocol/StandardizedDefinitions.java +++ b/app/src/main/java/lightcontainer/protocol/StandardizedDefinitions.java @@ -42,7 +42,7 @@ public class StandardizedDefinitions { public final static String FFE_SIGN_OK = "^SIGN_OK" + LINE + "$"; public final static String FFE_SIGN_ERROR = "^SIGN_ERROR" + LINE + "$"; public final static String CLIENT_FILE_LIST = "^FILELIST" + LINE + "$"; - public final static String FFE_FILE_LIST_RESULT = "^FILES" + "((" + PASSCHAR + "{1,20})!(" + DIGIT + "{1,10})){0,50}" + LINE + "$"; + public final static String FFE_FILE_LIST_RESULT = "^FILES" + "( (" + PASSCHAR + "{1,20})!(" + DIGIT + "{1,10})){0,50}" + LINE + "$"; public final static String CLIENT_SAVE_FILE = "^SAVEFILE" + BL + "(" + FILENAME + ")" + BL + "(" + SIZE + ")" + LINE + "$"; public final static String FFE_SAVE_FILE_OK = "^SAVEFILE_OK" + LINE + "$"; public final static String FFE_SAVE_FILE_ERROR = "^SAVEFILE_ERROR" + LINE + "$"; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java index 457f978..5749704 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java @@ -1,13 +1,16 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.protocol.ProtocolWriter; +import lightcontainer.protocol.StandardizedDefinitions; + +import static lightcontainer.protocol.StandardizedDefinitions.FFE_FILE_LIST_RESULT; /** * Règle permettant de construire une commande contenant la liste des fichiers d'un utilisateur */ public class FilesRule extends ProtocolWriter { //"^FILES( ([^ !]{1,20})!([0-9]{1,10})){0,50}\r\n$" - private static final String PATTERN = "^FILES( ([^ !]{1,20})!([0-9]{1,10})){0,50}\r\n$"; + private static final String PATTERN = FFE_FILE_LIST_RESULT; public static final String NAME = "FILES";