← Back to team overview

openlp-core team mailing list archive

[Bug 1209515] [NEW] getFileNames corrupts file names that use "special chars"

 

Public bug reported:

This is a little bit of a strange one. I have written a little script
which demonstrates this (I'll include it when I get home).


Here's the issue:

Use QFileDialog.getFileNames() to select a single file with a special
char in its name (a '#' will do it) and it returns the file name & path
correctly. Ie selecting a file called "#123.xml" returns a list with one
item "#123.xml"

However, use QFileDialog.getFileNames() to select multiple files with at
lease one file with special char in its name (a '#' will do it) and it
returns the file name & path incorrectly. Ie selecting a file called
"#123.xml" and a file called "abc.xml" returns a list with two items
"%23123.xml" & "abc.xml" (Note the # has been changed in to a %23.
Possible url encoding?)

When we come to open the file, Python cannot find the file "%23123.xml"
because it does not exist.

This seams to be a Qt bug (I've done a few searches, but found nothing)
but we could at least make some effort to see if the file actually
exists before trying to open it!

Reported here: http://support.openlp.org/issues/2056
and here: http://support.openlp.org/issues/1964

** Affects: openlp
     Importance: Undecided
         Status: New

** Affects: openlp/2.0
     Importance: Medium
         Status: Confirmed

** Affects: openlp/trunk
     Importance: Undecided
         Status: New


** Tags: support-system

** Changed in: openlp
       Status: New => Confirmed

** Changed in: openlp
   Importance: Undecided => Medium

** Also affects: openlp/2.0
   Importance: Undecided
       Status: New

** Also affects: openlp/trunk
   Importance: Medium
       Status: Confirmed

** Changed in: openlp/trunk
       Status: Confirmed => New

** Changed in: openlp/2.0
       Status: New => Confirmed

** Changed in: openlp/2.0
   Importance: Undecided => Medium

** Changed in: openlp/trunk
   Importance: Medium => Undecided

** Changed in: openlp/2.0
    Milestone: None => 2.0.2

** Changed in: openlp/trunk
    Milestone: None => 2.1.1

** Tags added: support-system

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

Title:
  getFileNames corrupts file names that use "special chars"

Status in OpenLP - Worship Presentation Software:
  New
Status in OpenLP 2.0 series:
  Confirmed
Status in OpenLP trunk series:
  New

Bug description:
  This is a little bit of a strange one. I have written a little script
  which demonstrates this (I'll include it when I get home).

  
  Here's the issue:

  Use QFileDialog.getFileNames() to select a single file with a special
  char in its name (a '#' will do it) and it returns the file name &
  path correctly. Ie selecting a file called "#123.xml" returns a list
  with one item "#123.xml"

  However, use QFileDialog.getFileNames() to select multiple files with
  at lease one file with special char in its name (a '#' will do it) and
  it returns the file name & path incorrectly. Ie selecting a file
  called "#123.xml" and a file called "abc.xml" returns a list with two
  items "%23123.xml" & "abc.xml" (Note the # has been changed in to a
  %23. Possible url encoding?)

  When we come to open the file, Python cannot find the file
  "%23123.xml" because it does not exist.

  This seams to be a Qt bug (I've done a few searches, but found
  nothing) but we could at least make some effort to see if the file
  actually exists before trying to open it!

  Reported here: http://support.openlp.org/issues/2056
  and here: http://support.openlp.org/issues/1964

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


Follow ups

References