Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3918

VFSWebservice: normalizing file name prevents file download

    XMLWordPrintable

    Details

      Description

      It's not possible to download a file via REST if the file name contains a blank or umlauts. Removing the normalizing fixes this problem.

       

      diff --git a/src/main/java/org/olat/core/util/vfs/restapi/VFSWebservice.java b/src/main/java/org/olat/core/util/vfs/restapi/VFSWebservice.java
      index ea62eca..8df075f 100644
      --- a/src/main/java/org/olat/core/util/vfs/restapi/VFSWebservice.java
      +++ b/src/main/java/org/olat/core/util/vfs/restapi/VFSWebservice.java
      @@ -525,7 +525,7 @@
       		for(PathSegment seg:path) {
       			String segPath = seg.getPath();
       			for(VFSItem item : directory.getItems(new SystemItemFilter())) {
      -				if(normalize(item.getName()).equals(segPath)) {
      +				if(item.getName().equals(segPath)) {
       					if(item instanceof VFSLeaf) {
       						if(path.get(path.size() - 1) == seg) {
       							resolvedItem = item;
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Mandy Menzel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 25 minutes
                25m