Changeset: e4ac7fcb2ea4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e4ac7fcb2ea4
Modified Files:
        gdk/gdk_bat.c
Branch: Jan2022
Log Message:

Fix backup path in backup_new.


diffs (19 lines):

diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -2164,9 +2164,14 @@ backup_new(Heap *hp, bool lock)
        char *batpath, *bakpath;
        struct stat st;
 
+       char *bak_filename = NULL;
+       if ((bak_filename = strrchr(hp->filename, DIR_SEP)) != NULL)
+               bak_filename++;
+       else
+               bak_filename = hp->filename;
        /* check for an existing X.new in BATDIR, BAKDIR and SUBDIR */
        batpath = GDKfilepath(hp->farmid, BATDIR, hp->filename, "new");
-       bakpath = GDKfilepath(hp->farmid, BAKDIR, hp->filename, "new");
+       bakpath = GDKfilepath(hp->farmid, BAKDIR, bak_filename, "new");
        if (batpath != NULL && bakpath != NULL) {
                /* file actions here interact with the global commits */
                if (lock)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to