On Sun, Aug 19, 2012 at 11:07 PM, Paul K <[email protected]> wrote:
> Hi John,
>
>> Does wx.wxFileName.FileExists("SomethingInThatDir.txt") work, showing
>> that SetCwd() worked?
>> If so then, it'd be a problem with GetCwd(), but I cannot think of any
>> reason why it wouldn't work off the top of my head...
>
> yes, it does seem like the problem is with GetCwd, and it should be
> easy to reproduce:
>
>> wx.wxFileName.SetCwd([[D:\Lua\下载\下载\]]);
>> print(wx.wxFileName.FileExists("foo.lua")); print(wx.wxGetCwd());
>> print(wx.wxFileName.SetCwd(wx.wxGetCwd()))
> true
> D:\Lua\??\??
> false
>
> As you can see, the file is there, but using the result of GetCwd to
> set it as the current folder fails (returns "false" the second time).
Hummm, I can't get to Windows machine right now, but I wonder if it's
something to do with the conversion to a Lua ansi string rather than
wxGetCwd() not returning the right value.
Try this:
s = wx.wxString([[D:\Lua\下载\下载\]])
print(s:GetData())
s2 = s:GetData()
print(s2)
Regards,
John
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users