X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/acdc3b6b5c870778f17fcfaac0353371bd7ab033..c958260b3886cb83aa93c7508d0986c6433ce165:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 7e2b9c3855..e5b536b0a6 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -112,7 +112,7 @@ #define _MAXPATHLEN 500 -extern char *wxBuffer; +extern wxChar *wxBuffer; #ifdef __WXMAC__ @@ -122,9 +122,7 @@ extern char *wxBuffer; #include "fspcompa.h" #endif -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxStringList) -#endif // ---------------------------------------------------------------------------- // private globals @@ -612,7 +610,6 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name) return wxRealPath(buf); } - /* Contract Paths to be build upon an environment variable component: @@ -978,9 +975,9 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil (fp2 = fopen (wxUnix2MacFilename( file2 ), "rb")) == NULL || (fp3 = fopen (wxUnix2MacFilename( outfile ), "wb")) == NULL) #else - if ((fp1 = fopen (WXSTRINGCAST file1, "rb")) == NULL || - (fp2 = fopen (WXSTRINGCAST file2, "rb")) == NULL || - (fp3 = fopen (outfile, "wb")) == NULL) + if ((fp1 = wxFopen (WXSTRINGCAST file1, wxT("rb"))) == NULL || + (fp2 = wxFopen (WXSTRINGCAST file2, wxT("rb"))) == NULL || + (fp3 = wxFopen (outfile, wxT("wb"))) == NULL) #endif { if (fp1) @@ -1020,9 +1017,9 @@ wxCopyFile (const wxString& file1, const wxString& file2) return FALSE; if ((fd2 = fopen (wxUnix2MacFilename( file2 ), "wb")) == NULL) #else - if ((fd1 = fopen (WXSTRINGCAST file1, "rb")) == NULL) + if ((fd1 = wxFopen (WXSTRINGCAST file1, wxT("rb"))) == NULL) return FALSE; - if ((fd2 = fopen (WXSTRINGCAST file2, "wb")) == NULL) + if ((fd2 = wxFopen (WXSTRINGCAST file2, wxT("wb"))) == NULL) #endif { fclose (fd1); @@ -1220,6 +1217,18 @@ wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf) #endif } +bool wxGetTempFileName(const wxString& prefix, wxString& buf) +{ + wxChar buf2[512]; + if (wxGetTempFileName(prefix, buf2) != (wxChar*) NULL) + { + buf = buf2; + return TRUE; + } + else + return FALSE; +} + // Get first file name matching given wild card. #ifdef __UNIX__ @@ -1293,7 +1302,9 @@ wxString wxFindNextFile() nextDir != NULL; nextDir = readdir(gs_dirStream) ) { - if (wxMatchWild(name, nextDir->d_name)) + if (wxMatchWild(name, nextDir->d_name, FALSE) && // RR: added FALSE to find hidden files + strcmp(nextDir->d_name, ".") && + strcmp(nextDir->d_name, "..") ) { result.Empty(); if ( !path.IsEmpty() )