projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support for unicode font names
[wxWidgets.git]
/
src
/
common
/
filefn.cpp
diff --git
a/src/common/filefn.cpp
b/src/common/filefn.cpp
index 84ebf76d347f062e0b60a00edc836bc9b250da0f..bb97970acc557d3dd62952f7a0fce0b43236f528 100644
(file)
--- a/
src/common/filefn.cpp
+++ b/
src/common/filefn.cpp
@@
-40,7
+40,7
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if !
defined(__WATCOMC__
)
+#if !
wxONLY_WATCOM_EARLIER_THAN(1,4
)
#if !(defined(_MSC_VER) && (_MSC_VER > 800))
#include <errno.h>
#endif
#if !(defined(_MSC_VER) && (_MSC_VER > 800))
#include <errno.h>
#endif
@@
-242,8
+242,7
@@
bool wxPathList::Member (const wxString& path)
wxString wxPathList::FindValidPath (const wxString& file)
{
wxString wxPathList::FindValidPath (const wxString& file)
{
- if (wxFileExists (wxExpandPath(wxFileFunctionsBuffer, file)))
- return wxString(wxFileFunctionsBuffer);
+ wxExpandPath(wxFileFunctionsBuffer, file);
wxChar buf[_MAXPATHLEN];
wxStrcpy(buf, wxFileFunctionsBuffer);
wxChar buf[_MAXPATHLEN];
wxStrcpy(buf, wxFileFunctionsBuffer);
@@
-252,7
+251,7
@@
wxString wxPathList::FindValidPath (const wxString& file)
for (wxStringList::compatibility_iterator node = GetFirst(); node; node = node->GetNext())
{
for (wxStringList::compatibility_iterator node = GetFirst(); node; node = node->GetNext())
{
- const wx
Char *path = node->GetData(
);
+ const wx
String path(node->GetData()
);
wxStrcpy (wxFileFunctionsBuffer, path);
wxChar ch = wxFileFunctionsBuffer[wxStrlen(wxFileFunctionsBuffer)-1];
if (ch != wxT('\\') && ch != wxT('/'))
wxStrcpy (wxFileFunctionsBuffer, path);
wxChar ch = wxFileFunctionsBuffer[wxStrlen(wxFileFunctionsBuffer)-1];
if (ch != wxT('\\') && ch != wxT('/'))
@@
-301,7
+300,12
@@
wxFileExists (const wxString& filename)
#else // !__WIN32__
wxStructStat st;
#ifndef wxNEED_WX_UNISTD_H
#else // !__WIN32__
wxStructStat st;
#ifndef wxNEED_WX_UNISTD_H
- return wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG);
+ return (wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG))
+#ifdef __OS2__
+ || (errno == EACCES) // if access is denied something with that name
+ // exists and is opened in exclusive mode.
+#endif
+ ;
#else
return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG);
#endif
#else
return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG);
#endif