+/*
+ Copyright (C) 2012 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
#include <algorithm>
#include <cstring>
#include <glibmm.h>
-#include "pbd/filesystem.h"
#include "pbd/basename.h"
#include "pbd/pathscanner.h"
#include "pbd/xml++.h"
return spath;
}
-sys::path
+std::string
user_template_directory ()
{
- sys::path p(user_config_directory());
- p /= templates_dir_name;
-
- return p;
+ return Glib::build_filename (user_config_directory(), templates_dir_name);
}
-sys::path
+std::string
user_route_template_directory ()
{
- sys::path p(user_config_directory());
- p /= route_templates_dir_name;
-
- return p;
+ return Glib::build_filename (user_config_directory(), route_templates_dir_name);
}
static bool
string
session_template_dir_to_file (string const & dir)
{
- sys::path dir_path = dir;
- sys::path file_path = dir;
- file_path /= dir_path.leaf() + template_suffix;
- return file_path.to_string ();
+ return Glib::build_filename (dir, Glib::path_get_basename(dir) + template_suffix);
}