xml-copy-editor-code/src/getlinuxappdir.cpp

23 lines
456 B
C++
Raw Normal View History

2007-08-30 01:12:56 +02:00
#include "getlinuxappdir.h"
#include <wx/filename.h>
wxString GetLinuxAppDir::run()
{
wxString s;
const int stringArrayLen = 2;
wxString stringArray[stringArrayLen];
stringArray[0] = _T("/usr/share/xmlcopyeditor");
stringArray[1] = _T("/usr/local/share/xmlcopyeditor");
for (int i = 0; i < stringArrayLen; i++)
{
s = stringArray[i];
if (wxFileName::DirExists(s))
break;
}
if (s.empty())
s = wxGetCwd();
return s;
}