Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-48929

error on windows system repository/filesystem/lib.php

    XMLWordPrintable

Details

    Description

      The function send_relative_file in repository/filesystem/lib.php does not work as expected in a windows system.

      The condition
      if (strpos($fullrelativefilepath, $this->get_rootpath()) === 0 && file_exists($fullrelativefilepath))

      { send_file($fullrelativefilepath, basename($relativepath), null, 0); }

      Well just strpos($fullrelativefilepath, $this->get_rootpath()) return false because of mixed slashes. A dump from the problem on my system:
      $this->get_rootpath()='C:\www\moodledata\26/repository/scorm/'
      $fullrelativefilepath= 'C:\www\moodledata\26\repository\scorm\...'

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              nmoller Nelson Moller
              Frédéric Massart Frédéric Massart
              Andrew Lyons Andrew Lyons
              Adrian Greeve Adrian Greeve
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Mar/15