13
0

Make PBD::sys::exists_and_writable take a string instead of sys::path

git-svn-id: svn://localhost/ardour2/branches/3.0@12864 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry 2012-06-23 05:08:17 +00:00
parent e26e59b006
commit 878acbee14
3 changed files with 5 additions and 5 deletions

View File

@ -521,7 +521,7 @@ Session::create (const string& session_template, BusProfile* bus_profile)
return -1;
}
_writable = exists_and_writable (sys::path (_path));
_writable = sys::exists_and_writable (_path);
if (!session_template.empty()) {
std::string in_path = session_template_dir_to_file (session_template);
@ -894,7 +894,7 @@ Session::load_state (string snapshot_name)
set_dirty();
_writable = exists_and_writable (xmlpath);
_writable = sys::exists_and_writable (xmlpath.to_string());
if (!state_tree->read (xmlpath.to_string())) {
error << string_compose(_("Could not understand ardour file %1"), xmlpath.to_string()) << endmsg;

View File

@ -94,7 +94,7 @@ exists (const path & p)
}
bool
exists_and_writable (const path & p)
exists_and_writable (const std::string & p)
{
/* writable() really reflects the whole folder, but if for any
reason the session state file can't be written to, still
@ -103,7 +103,7 @@ exists_and_writable (const path & p)
struct stat statbuf;
if (g_stat (p.to_string().c_str(), &statbuf) != 0) {
if (g_stat (p.c_str(), &statbuf) != 0) {
/* doesn't exist - not writable */
return false;
} else {

View File

@ -121,7 +121,7 @@ bool exists(const path & p);
/// @return true if path at p exists and is writable, false otherwise
bool exists_and_writable(const path & p);
bool exists_and_writable(const std::string & p);
/// @return true if path at p is a directory.
bool is_directory(const path & p);