Boost logo

Boost Users :

Subject: [Boost-users] FileSystem: crash on OSX 10.8 with create_directory
From: Tim Burgess (tim_at_[hidden])
Date: 2014-02-07 11:32:29


Hi,

My app crashes out when I run the following:

                boost::filesystem::path myPath = wxStandardPaths::Get().GetConfigDir().ToStdWstring();
        
                if (myPath.has_filename())
        {
                myPath.remove_filename();
        }

// Add the company name and check for directory existence
        myPath /=wstrRBCompanyName;
        
        if (!boost::filesystem::exists(myPath))
        {
// The following test displays the path I'd expect to see (/library/Raised Bar in my case)
                wxMessageBox( myPath.native(), wstrErrorTitle, wxOK | wxICON_EXCLAMATION);
                // Create the required directory - displays a message box indicating deletion of a lock file here and the app exits
                boost::filesystem::create_directory(myPath);
        }
This code appears to work fine on Windows, but fails on OSX 10.8. I should point out that I'm a blind programmer and I'm struggling to get Apple's VoiceOver utility to interact in a useful manner with Xcode 5's debugger and that's why I'm using a wxMessageBox to try and track down my failure.

Best wishes.

Tim



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net