From c471793fbc01fe0cd4dc0bd34b0fd4ce3466c446 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Fri, 3 Feb 2012 14:11:08 -0800
Subject: [PATCH] Treat program name starting with "." as absolute path

In srun --multi-prog mode, treat file name that begins with "."
as an absolute pathname with no need to use PATH.
Patch by Hongjia Cao, NUDT.
---
 src/srun/multi_prog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/srun/multi_prog.c b/src/srun/multi_prog.c
index caca6347c0e..a61a3e70477 100644
--- a/src/srun/multi_prog.c
+++ b/src/srun/multi_prog.c
@@ -85,7 +85,7 @@ _build_path(char* fname)
 	}
 
 	/* check if already absolute path */
-	if (file_name[0] == '/')
+	if ((file_name[0] == '/') || (file_name[0] == '.'))
 		return file_name;
 
 	/* search for the file using PATH environment variable */
-- 
GitLab