← Back to team overview

mahara-contributors team mailing list archive

[Bug 813905] A change has been merged

 

Reviewed:  https://reviews.mahara.org/697
Committed: http://gitorious.org/mahara/mahara/commit/ff3fd0e468c48964ce2e46a229bacda801250f7f
Submitter: Francois Marier (francois@xxxxxxxxxxxxxxx)
Branch:    master

commit ff3fd0e468c48964ce2e46a229bacda801250f7f
Author: Melissa Draper <melissa@xxxxxxxxxxxxxxx>
Date:   Thu Sep 15 17:48:10 2011 +1200

    Trim directory names before they are made (bug #813905)
    
    There are several places in the code where we make directories
    for stuff, both in the filesystem and in the artefacts table.
    If they have trailing spaces, then this can mess up users html
    exports etc. This patch should make exports safe for existing
    folders with whitespace at the end, and prevent new folders from
    from being made with the problem.
    
    Change-Id: Ia593f7f773e5ffe91ce74e8a736074b1fe1026b2
    Signed-off-by: Melissa Draper <melissa@xxxxxxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/813905

Title:
  Trailing Spaces in Folder Names effect HTML Export

Status in Mahara ePortfolio:
  Fix Committed

Bug description:
  Found an issue with a student's HTML export where files would be
  present in the zip file, but the zip extractor (in this case WinRAR)
  reported the following:

  !   C:\Users\gagesw\Downloads\Mahara\mahara-export-html-user230-1311221980.zip: Cannot create portfolio-for-gagesw\files\file\Here is a folder with trailing spaces  \title-vidmaster.gif
      The system cannot find the path specified.
  !   C:\Users\gagesw\Downloads\Mahara\mahara-export-html-user230-1311221980.zip: Attempting to correct the invalid file name
  !   C:\Users\gagesw\Downloads\Mahara\mahara-export-html-user230-1311221980.zip: Renaming portfolio-for-gagesw\files\file\Here is a folder with trailing spaces

  While this fixes the issue, the HTML pages are generated before the
  zip is even created so all its references to files in the folder will
  be broken.

  Regarding the folder itself in the file area, the user can fix the
  folder name but they may not even notice the issue due to the trailing
  spaces being concatenated in the links (see attached image).

  This issue does not effect the file share as files/folders are given
  numerical references.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/813905/+subscriptions


References