From: Vadim Zeitlin Date: Sat, 16 Dec 2006 15:18:41 +0000 (+0000) Subject: don't set score files permissions to 0666, why would this be needed or wanted? (and... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a2f2764dfb323c70488243f8aa791e2bf780cb0a don't set score files permissions to 0666, why would this be needed or wanted? (and it didn't compile in Unicode build) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/demos/forty/scorefil.cpp b/demos/forty/scorefil.cpp index f85ec62988..83c2e6e45b 100644 --- a/demos/forty/scorefil.cpp +++ b/demos/forty/scorefil.cpp @@ -33,34 +33,6 @@ ScoreFile::ScoreFile(const wxString& appName) { -#if 0 - wxString filename; - m_configFilename << "/usr/local/share/" << appName << ".scores"; - if (access(m_configFilename, F_OK) == 0) - { - if (access(m_configFilename, R_OK | W_OK) != 0) - { - // file is not r/w - use local file instead - m_configFilename = wxFileConfig::GetLocalFileName(appName); - } - } - else - { - int fd = creat(m_configFilename, 0666); - - if (fd < 0) - { - // failed to create file - use local file instead - m_configFilename = wxFileConfig::GetLocalFileName(appName); - } - else - { - // ensure created file has rw-rw-rw permissions - close(fd); - } - } -#endif - m_config = new wxConfig(appName, _T("wxWidgets"), appName, wxEmptyString, wxCONFIG_USE_LOCAL_FILE); // only local } @@ -68,11 +40,6 @@ ScoreFile::ScoreFile(const wxString& appName) ScoreFile::~ScoreFile() { delete m_config; -#ifdef __WXGTK__ - // ensure score file has rw-rw-rw permissions - // (wxFileConfig sets them to rw-------) - chmod(m_configFilename, 0666); -#endif }