[gnote/stable-0.6] Fix the opening of links beginning with `~/'



commit 195987e2cdfc9a4fa98110998195cb1e7e7e383d
Author: Iain Nicol <iainn src gnome org>
Date:   Sat Dec 19 03:21:12 2009 +0000

    Fix the opening of links beginning with `~/'
    
    Fixes: https://bugzilla.gnome.org/592937
    
    Signed-off-by: Debarshi Ray <debarshir src gnome org>
    (cherry picked from commit 3ce37fc97242f5aa5accfe2aa0641b7bc946d0e2)

 src/watchers.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 98f8f8d..1b6911a 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -465,7 +465,8 @@ namespace gnote {
     else if (sharp::string_starts_with(url, "~/")) {
       const char * home = getenv("HOME");
       if(home) {
-        url = std::string("file://") + home + sharp::string_substring(url, 2);
+        url = std::string("file://") + home + "/" +
+          sharp::string_substring(url, 2);
       }
     }
     else if (sharp::string_match_iregex(url, 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]