]> git.saurik.com Git - wxWidgets.git/commitdiff
Some Unicode compilation fixes. This Unicode stuff in file functions is
authorOve Kaaven <ovek@arcticnet.no>
Thu, 29 Mar 2001 14:06:43 +0000 (14:06 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Thu, 29 Mar 2001 14:06:43 +0000 (14:06 +0000)
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

index def73f29d7484c61fd9ae2956e1f07121999a665..b8ceb922f1455ff259f559ccddcc40c555e0bca9 100644 (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