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

file_system_filedir should check the return value of rename when writing files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.10.5, 3.11.1
    • 3.10.4, 3.11
    • Files API
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • Hide

      This patch should have no effect. I cannot think of any way to test it directly (unless you are a wizard at simulating weird NFS behaviour.)

      I think the main check is a full PHPunit + Behat run, to ensure it does not cause regressions.

      Show
      This patch should have no effect. I cannot think of any way to test it directly (unless you are a wizard at simulating weird NFS behaviour.) I think the main check is a full PHPunit + Behat run, to ensure it does not cause regressions.

    Description

      This might help find possible causes of MDL-71990.

      The file API writes files to disc by first writing them with .tmp added to then name, and then doing a rename, which is more likely to be atomic. However, it does not check the return value of that rename call, which might be letter errors go unreported.

      So, adding in that error handling.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Brendan Heywood Brendan Heywood
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              CiBoT CiBoT
              Votes:
              1 Vote for this issue
              Watchers:
              4 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 - 11 minutes
                  11m

                  Clockify

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