2.7 regression: loading xrc from memory:zipfs fails

Alex Bligh alex at alex.org.uk
Wed Jul 5 16:28:50 PDT 2006


I have a program that works fine on 2.6 loading resources in a memoryfs
with a zipfs inside it. This fails on 2.7 for two reasons. Firstly
for reasons that will become obvious, a date comparitor fails unless
I do:
   wxXmlResource::Get()->SetFlags(wxXRC_NO_RELOADING);
I get the feeling this should be the default.

Secondly (and there is no work around for this I can see),
wxZipFSHandler::OpenFile(...) at fs_zip.cpp:128 calls
GetModificationTime(). This in turn calls
wxFileName::GetTimes(...) which logs an error at
line 2014, because its use seems to be predicated
on the appropriate filename existing. Clearly it
will not when embedded into a memoryfs. My feeling
is that either the use of GetFileName here is flawed
because the file could be embedded in any other
wxFileSystem, OR that wxFileName::GetTimes() should
not assume the filename is a system relative path.

In any case, producing the error is unhelpful. I now get
an error on every tool switch and every dialog load on
XaraLX, which would appear to me to be a pretty serious
regression (we can't be the only ones using zipped
XRC to load dialogs).

For the time being, I suggest commenting out the
wxLogSysError() - there isn't an error, the routine
is simply inadequate to the task of retrieving the
times concerned. Any objections?

Alex





More information about the wx-dev mailing list