mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Use sys::path and ARDOUR::user_config_directory in ARDOUR::read/write_recent_sessions
git-svn-id: svn://localhost/ardour2/trunk@2045 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7459379ec4
commit
e71ec730bf
1 changed files with 18 additions and 4 deletions
|
|
@ -23,19 +23,30 @@
|
|||
#include <algorithm>
|
||||
#include <pbd/error.h>
|
||||
#include <ardour/configuration.h>
|
||||
#include <ardour/filesystem_paths.h>
|
||||
#include <ardour/recent_sessions.h>
|
||||
#include <ardour/utils.h>
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
namespace {
|
||||
|
||||
const char * const recent_file_name = "recent";
|
||||
|
||||
} // anonymous
|
||||
|
||||
int
|
||||
ARDOUR::read_recent_sessions (RecentSessions& rs)
|
||||
{
|
||||
string path = get_user_ardour_path();
|
||||
path += "/recent";
|
||||
sys::path recent_file_path(user_config_directory());
|
||||
|
||||
recent_file_path /= recent_file_name;
|
||||
|
||||
const string path = recent_file_path.to_string();
|
||||
|
||||
ifstream recent (path.c_str());
|
||||
|
||||
|
|
@ -82,8 +93,11 @@ ARDOUR::read_recent_sessions (RecentSessions& rs)
|
|||
int
|
||||
ARDOUR::write_recent_sessions (RecentSessions& rs)
|
||||
{
|
||||
string path = get_user_ardour_path();
|
||||
path += "/recent";
|
||||
sys::path recent_file_path(user_config_directory());
|
||||
|
||||
recent_file_path /= recent_file_name;
|
||||
|
||||
const string path = recent_file_path.to_string();
|
||||
|
||||
ofstream recent (path.c_str());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue