patch 9.1.1450: Session has wrong arglist with :tcd and :arglocal

Problem:  Session has wrong arglist with :tcd and :arglocal.
Solution: Also use absolute path for :argadd when there is tabpage-local
          directory (zeertzjq).

related: neovim/neovim#34405
closes: #17503

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/session.c b/src/session.c
index 8dd0bc3..34ecd9f 100644
--- a/src/session.c
+++ b/src/session.c
@@ -301,6 +301,7 @@
 put_view(
     FILE	*fd,
     win_T	*wp,
+    tabpage_T	*tp,
     int		add_edit,	     // add ":edit" command to view
     unsigned	*flagp,		     // vop_flags or ssop_flags
     int		current_arg_idx,     // current argument index of the window,
@@ -328,6 +329,7 @@
 	if (ses_arglist(fd, "arglocal", &wp->w_alist->al_ga,
 			flagp == &vop_flags
 			|| !(*flagp & SSOP_CURDIR)
+			|| tp->tp_localdir != NULL
 			|| wp->w_localdir != NULL, flagp) == FAIL)
 	    return FAIL;
     }
@@ -899,7 +901,8 @@
 	{
 	    if (!ses_do_win(wp))
 		continue;
-	    if (put_view(fd, wp, wp != edited_win, &ssop_flags, cur_arg_idx,
+	    if (put_view(fd, wp, tp, wp != edited_win, &ssop_flags,
+							 cur_arg_idx,
 #ifdef FEAT_TERMINAL
 							 &terminal_bufs
 #else
@@ -1335,8 +1338,8 @@
 	    }
 	    else
 	    {
-		failed |= (put_view(fd, curwin, !using_vdir, flagp, -1, NULL)
-								      == FAIL);
+		failed |= (put_view(fd, curwin, curtab, !using_vdir, flagp, -1,
+								NULL) == FAIL);
 	    }
 	    if (put_line(fd, "let &g:so = s:so_save | let &g:siso = s:siso_save")
 								      == FAIL)