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

Filepicker renames top folder name to "0" when you zip files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: STABLE backlog
    • Component/s: Filepicker
    • Labels:
    • Workaround:
      Hide

      Zip the file manually, but not on a Mac.

      Show
      Zip the file manually, but not on a Mac.
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      Steps to reproduce

      1. Try to upload a new plugin to the Modules and plugins database.
      2. Get some cryptic error message about the zip file being in the wrong format.
      3. (Optional) waste half an hour trying to make a zip file on a mac, before realising that it adds an invisible __MACOS file that the plugins database will reject.
      4. So, unzip the code in the file-picker, and re-name the top-level folder to the name of your plugin, like code_checker.
      5. Re-zip the code and try to submit the form again.
      6. (optional) swear a lot in developer chat.
      7. Un-zip the zip again, and find that filepicker has re-named to top-level folder in the zip to 0.

      That is crazy. And, of course you could use another form to reproduce this, e.g. forum attachments.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: