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

              Assignee:
              fred Frédéric Massart
              Reporter:
              nmoller Nelson Moller
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Andrew Nicols
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Mar/15