Moodle
  1. Moodle
  2. MDL-26798

Repository: Dropbox does not list files if directory name contains a space

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Repositories
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16739

      Description

      Dongsheng - Per http://moodle.org/mod/forum/discuss.php?d=169304#p749343, I tested this by creating a folder with a space in the name and then adding a file to that folder using dropbox web interface. Then I went into Moodle and went to select the file and although I did see the directory I did not see the file. When I removed the space from the dropbox folder name and went back to browse the folder in Moodle the file appeared. I looked at the code in /repository/dropbox/lib.php and did not see anything get_listing that was obvious. Let me know if you have any questions or anything you need tested. Peace - Anthony

        Activity

        Hide
        Myles Carrick added a comment -

        The directory paths weren't being encoded properly so spaces were breaking things. I've a patch in my branch at https://github.com/mylescarrick/moodle/tree/MDL-26798- it's all in one commit at https://github.com/mylescarrick/moodle/commit/6780fced819c1eeb84167fae2164e6d22d0b181c

        Show
        Myles Carrick added a comment - The directory paths weren't being encoded properly so spaces were breaking things. I've a patch in my branch at https://github.com/mylescarrick/moodle/tree/MDL-26798- it's all in one commit at https://github.com/mylescarrick/moodle/commit/6780fced819c1eeb84167fae2164e6d22d0b181c
        Hide
        Dongsheng Cai added a comment -

        raise the priority of this issue, filenames with space are quite common.

        Show
        Dongsheng Cai added a comment - raise the priority of this issue, filenames with space are quite common.
        Hide
        Anthony Borrow added a comment -

        Thanks Myles for the patch! I'm sure this will help make Dongsheng's job a bit easier. Peace - Anthony

        Show
        Anthony Borrow added a comment - Thanks Myles for the patch! I'm sure this will help make Dongsheng's job a bit easier. Peace - Anthony
        Hide
        Myles Carrick added a comment -

        Cheers guys - thanks for moving so quickly on this one. Spaces in filenames were already being encoded correctly, but it's spaces the foldernames (i.e. the file path) that were causing it to break.

        Show
        Myles Carrick added a comment - Cheers guys - thanks for moving so quickly on this one. Spaces in filenames were already being encoded correctly, but it's spaces the foldernames (i.e. the file path) that were causing it to break.
        Hide
        Dongsheng Cai added a comment -

        Hi Myles

        Thanks a lot for the patch! It worked well.

        Added a few lines to your patch to fix the %20 in breadcrumb.

        Regards,
        Dongsheng Cai

        Show
        Dongsheng Cai added a comment - Hi Myles Thanks a lot for the patch! It worked well. Added a few lines to your patch to fix the %20 in breadcrumb. Regards, Dongsheng Cai
        Hide
        Dongsheng Cai added a comment -

        PULL request submitted, thanks

        Show
        Dongsheng Cai added a comment - PULL request submitted, thanks
        Hide
        Helen Foster added a comment -

        This issue is fixed in this week's 2.0.2+. Thanks everyone

        Show
        Helen Foster added a comment - This issue is fixed in this week's 2.0.2+. Thanks everyone

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: