Some Unicode compilation fixes. This Unicode stuff in file functions is

always so hard to get right, it seems... I don't like that wxStat isn't
a Unicode wrapper for the real Linux libc stat(), so the caller needs to
convert it for wxStat, but not for e.g. wxRename... this is inconsistent,
so it's not surprising people don't get it right, I guess.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven 2001-03-29 14:06:43 +00:00
parent d43088ee78
commit c3396917e8

View File

@ -1001,7 +1001,7 @@ wxCopyFile (const wxString& file1, const wxString& file2)
wxStructStat fbuf;
// get permissions of file1
if ( wxStat(file1, &fbuf) != 0 )
if ( wxStat(OS_FILENAME(file1), &fbuf) != 0 )
{
// the file probably doesn't exist or we haven't the rights to read
// from it anyhow
@ -1060,7 +1060,7 @@ wxCopyFile (const wxString& file1, const wxString& file2)
#if !defined(__VISAGECPP__) && !defined(__WXMAC__)
// no chmod in VA. SHould be some permission API for HPFS386 partitions however
if ( chmod(file2, fbuf.st_mode) != 0 )
if ( chmod(OS_FILENAME(file2), fbuf.st_mode) != 0 )
{
wxLogSysError(_("Impossible to set permissions for the file '%s'"),
file2.c_str());
@ -1074,7 +1074,7 @@ bool
wxRenameFile (const wxString& file1, const wxString& file2)
{
// Normal system call
if ( wxRename (OS_FILENAME(file1), OS_FILENAME(file2)) == 0 )
if ( wxRename (file1, file2) == 0 )
return TRUE;
// Try to copy