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

file_system_filedir should check the return value of rename when writing files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor 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.

      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.

            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

              Created:
              Updated:
              Resolved:

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

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