branch develop updated (a15910c -> 0c83630)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git from a15910c [jgitflow-maven-plugin]Updating develop poms back to pre merge state new e364b64 Detects real file format when finding a file ending with .vm new 0c83630 Fixes #3781 (Better vm files format detection) Merge branch 'feature/3781' into develop The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 0c83630668606f45d597f735e7f9f4424482045b Merge: a15910c e364b64 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Oct 23 19:22:01 2015 +0200 Fixes #3781 (Better vm files format detection) Merge branch 'feature/3781' into develop commit e364b64c6ed3d14fb47e61ab84378cfded736cf6 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Oct 23 19:21:57 2015 +0200 Detects real file format when finding a file ending with .vm Summary of changes: .../org/nuiton/scmwebeditor/uiweb/actions/EditAction.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit e364b64c6ed3d14fb47e61ab84378cfded736cf6 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Oct 23 19:21:57 2015 +0200 Detects real file format when finding a file ending with .vm --- .../org/nuiton/scmwebeditor/uiweb/actions/EditAction.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java index 65ee45c..1445d4f 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java @@ -139,7 +139,16 @@ public class EditAction extends ScmWebEditorMainAction { scmSupportsBranches = provider.supportsBranches(); scmSupportsPush = provider.supportsPush(); - format = scmConn.getFileName().substring(scmConn.getFileName().lastIndexOf(".") + 1); + String fileName = scmConn.getFileName(); + format = fileName.substring(fileName.lastIndexOf(".") + 1); + + if ("vm".equals(format)) { + + // Try to get extension before vm one + fileName = fileName.substring(0, fileName.length()-3); + format = fileName.substring(fileName.lastIndexOf(".") + 1); + + } String originalText = ""; @@ -322,7 +331,7 @@ public class EditAction extends ScmWebEditorMainAction { mimeType = null; try { - mimeType = getMimeType(originalText, scmConn.getFileName()); + mimeType = getMimeType(originalText, fileName); } catch (IOException e) { if (log.isErrorEnabled()) { log.error("Can't get MimeType, problem when reading file", e); -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm