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
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.10.4, 3.11
    • 3.10.5, 3.11.1
    • Files API

    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
              Matteo Scaramuccia, 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:
                12/Jul/21

                Time Tracking

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