From 6aa5cb8d3e7f801af7e364637ba14ac896a8c370 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 4 Apr 2022 12:26:02 +0200 Subject: [PATCH] abs path of abs path, wip --- slsDetectorServers/slsDetectorServer/src/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/slsDetectorServers/slsDetectorServer/src/common.c b/slsDetectorServers/slsDetectorServer/src/common.c index 62c289a01..dc48274f4 100644 --- a/slsDetectorServers/slsDetectorServer/src/common.c +++ b/slsDetectorServers/slsDetectorServer/src/common.c @@ -50,6 +50,10 @@ int ConvertToDifferentRange(int inputMin, int inputMax, int outputMin, } int getAbsPath(char *buf, size_t bufSize, char *fname) { + if (fname[0] == '/') { + strcpy(buf, fname); + return OK; + } // get path of current binary char path[bufSize]; memset(path, 0, bufSize);