summaryrefslogtreecommitdiff
path: root/libs/ardour/find_session.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/find_session.cc
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff)
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/find_session.cc')
-rw-r--r--libs/ardour/find_session.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc
index e28bbe9ccb..a572a9a7a3 100644
--- a/libs/ardour/find_session.cc
+++ b/libs/ardour/find_session.cc
@@ -31,7 +31,7 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
}
str = buf;
-
+
/* check to see if it exists, and what it is */
if (stat (str.c_str(), &statbuf)) {
@@ -54,9 +54,9 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
if (S_ISDIR (statbuf.st_mode)) {
string::size_type slash = str.find_last_of ('/');
-
+
if (slash == string::npos) {
-
+
/* a subdirectory of cwd, so statefile should be ... */
string tmp;
@@ -66,7 +66,7 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
tmp += statefile_suffix;
/* is it there ? */
-
+
if (stat (tmp.c_str(), &statbuf)) {
error << string_compose (_("cannot check statefile %1 (%2)"), tmp, strerror (errno))
<< endmsg;
@@ -85,16 +85,16 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
path = str;
snapshot = str.substr (slash+1);
-
+
}
} else if (S_ISREG (statbuf.st_mode)) {
-
+
string::size_type slash = str.find_last_of ('/');
string::size_type suffix;
/* remove the suffix */
-
+
if (slash != string::npos) {
snapshot = str.substr (slash+1);
} else {
@@ -102,7 +102,7 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
}
suffix = snapshot.find (statefile_suffix);
-
+
if (suffix == string::npos) {
error << string_compose (_("%1 is not an Ardour snapshot file"), str) << endmsg;
return -1;
@@ -111,10 +111,10 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
/* remove suffix */
snapshot = snapshot.substr (0, suffix);
-
+
if (slash == string::npos) {
-
- /* we must be in the directory where the
+
+ /* we must be in the directory where the
statefile lives. get it using cwd().
*/
@@ -134,7 +134,7 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
path = str.substr (0, slash);
}
-
+
} else {
/* what type of file is it? */
@@ -151,14 +151,14 @@ ARDOUR::find_session (string str, string& path, string& snapshot, bool& isnew)
string::size_type slash = str.find_last_of ('/');
if (slash == string::npos) {
-
+
/* no slash, just use the name, but clean it up */
-
+
path = legalize_for_path (str);
snapshot = path;
-
+
} else {
-
+
path = str;
snapshot = str.substr (slash+1);
}