Code

prepare_update_file: assume file is relative to root directory
authorJonas Fonseca <jonas.fonseca@savoirfairelinux.com>
Tue, 15 Dec 2009 15:43:17 +0000 (10:43 -0500)
committerJonas Fonseca <jonas.fonseca@savoirfairelinux.com>
Tue, 15 Dec 2009 15:43:17 +0000 (10:43 -0500)
tig.c

diff --git a/tig.c b/tig.c
index 602c8678614339d8ad6310f6ee158c4063ec25f6..77f06651a9acbe9c61c60794321cd19a79643016 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3081,7 +3081,7 @@ prepare_update_file(struct view *view, const char *name)
 {
        if (view->pipe)
                end_update(view, TRUE);
-       return io_open(&view->io, "%s", name);
+       return io_open(&view->io, "%s/%s", opt_cdup[0] ? opt_cdup : ".", name);
 }
 
 static bool