Opened 18 months ago

Closed 18 months ago

Last modified 17 months ago

#15243 closed defect (fixed)

wxXmlResource::Load() is case-sensitive even under Windows

Reported by: troelsk Owned by:
Priority: normal Milestone:
Component: XRC Version: stable-latest
Keywords: wxFileSystem wxXmlResource Cc:
Blocked By: Blocking:
Patch: no

Description

  1. On Windows wxXmlResource::Load() is case sensitive, if you pass "Basicdlg.xrc" and the actual file name is "basicdlg.xrc", load fails.
  2. If you instead enable the wxFindFirstFile() section inside the Load() method, Load() fails to find and load anything at all (seen with the sample xrcdemo)

Change History (4)

comment:1 Changed 18 months ago by vadz

  • Summary changed from wxXmlResource::Load() problems to wxXmlResource::Load() is case-sensitive even under Windows

(1) is clearly wrong and should be fixed. If you can look at what happens here, it would be most welcome.

I'm not sure about (2), what exactly needs to be done to reproduce the problem?

comment:2 Changed 18 months ago by troelsk

1

If you can look at what happens here, it would be most welcome.

Am not fond of wxFileSystem

2
Just use wxFindFirstFile inside wxXmlResource::Load(), instead of wxFileSystem

comment:3 Changed 18 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74243]) Restore case-insensitivity for file name matching under Windows.

This was broken by the changes of r73790, see #3432. Fix this by converting
both the file name and the wildcard mask to the upper case before checking
whether the former matches the latter.

Closes #15243.

comment:4 Changed 17 months ago by troelsk

Works fine now, thanks

Note: See TracTickets for help on using tickets.