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

error on windows system repository/filesystem/lib.php

XMLWordPrintable

      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\...'

            fred Frédéric Massart
            nmoller Nelson Moller
            Frédéric Massart Frédéric Massart
            Andrew Lyons Andrew Lyons
            Adrian Greeve Adrian Greeve
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.