Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDav method for connector type 'File Reader' is buggy #4173

Open
rbeckman-nextgen opened this issue May 11, 2020 · 1 comment
Open

WebDav method for connector type 'File Reader' is buggy #4173

rbeckman-nextgen opened this issue May 11, 2020 · 1 comment
Labels

Comments

@rbeckman-nextgen
Copy link
Collaborator

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

WebDav method for connector type 'File Reader' does not work correctly.

After debugging i have found where issue is occured, bellow quick fix :

In ./server/src/com/mirth/connect/connectors/file/filesystems/WebDavConnection.java

....

  • private String getStrippedFileName(String pathfile) {

  •   if (pathfile.indexOf('/') == -1) {
    
  •      return pathfile;
    
  • } else {
    
  •       String [] splited_path = pathfile.split("/");
    
  •      return splited_path [splited_path.length - 1];
    
  • }
    
  • }

private String getFullPath(String dir, String file) {

   + String _dir = (dir.equals("/") ? "" : dir);  // resolve BUG : case  dir  ==  '/'

   + String strippedFileName = this.getStrippedFileName(file);  // resolve BUG : case file is like  path/to/file

    return ("/" + _dir + "/" + strippedFileName).replaceAll("//", "/");

}

Imported Issue. Original Details:
Jira Issue Key: MIRTH-4297
Reporter: aher_moh
Created: 2018-06-15T08:43:44.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

Fix proposed in bug description worked fine.

Imported Comment. Original Details:
Author: aher_moh
Created: 2018-06-15T08:56:19.000-0700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.