- if (sys::exists (new_path)) {
- warning << string_compose(_("Template \"%1\" already exists - template not renamed"),
- new_path.to_string()) << endmsg;
- return -1;
- }
-
- try {
- sys::rename (old_path, new_path);
- return 0;
- } catch (...) {
- return -1;
- }
-}
-
-int
-Session::delete_template (string name)
-{
- sys::path path = user_template_directory();
- path /= name + template_suffix;
-
- try {
- sys::remove (path);
- return 0;
- } catch (...) {
- return -1;
- }