From c3396917e888355d3e7060cbb238a66339d8feb5 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Thu, 29 Mar 2001 14:06:43 +0000 Subject: [PATCH] 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 --- src/common/filefn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index def73f2..b8ceb92 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -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 -- 2.7.4