[gnote] use Glib::build_filename where applicable
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnote] use Glib::build_filename where applicable
- Date: Fri, 29 May 2009 00:31:34 -0400 (EDT)
commit 047176a7add11deaa836b2f1afeb2cc1b5ee771b
Author: Hubert Figuiere <hub figuiere net>
Date: Thu May 28 21:27:55 2009 -0400
use Glib::build_filename where applicable
---
src/notemanager.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/notemanager.cpp b/src/notemanager.cpp
index ae18526..5ed1204 100644
--- a/src/notemanager.cpp
+++ b/src/notemanager.cpp
@@ -39,8 +39,9 @@
#include "gnote.hpp"
#include "tagmanager.hpp"
#include "trie.hpp"
-#include "sharp/exception.hpp"
#include "sharp/directory.hpp"
+#include "sharp/exception.hpp"
+#include "sharp/files.hpp"
#include "sharp/uuid.hpp"
#include "sharp/string.hpp"
#include "sharp/datetime.hpp"
@@ -370,7 +371,7 @@ namespace gnote {
boost::filesystem::create_directory(m_backup_dir);
}
std::string backup_path
- = m_backup_dir + "/" + boost::filesystem::path(note->file_path()).leaf();
+ = Glib::build_filename(m_backup_dir, sharp::file_filename(note->file_path()));
if (boost::filesystem::exists(backup_path))
boost::filesystem::remove(backup_path);
@@ -398,7 +399,7 @@ namespace gnote {
std::string NoteManager::make_new_file_name(const std::string & guid) const
{
- return m_notes_dir + "/" + guid + ".note";
+ return Glib::build_filename(m_notes_dir, guid + ".note");
}
Note::Ptr NoteManager::create()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]