diff --git a/slsDetectorServers/slsDetectorServer/src/common.c b/slsDetectorServers/slsDetectorServer/src/common.c index 88d8e93e6..d0626aa23 100644 --- a/slsDetectorServers/slsDetectorServer/src/common.c +++ b/slsDetectorServers/slsDetectorServer/src/common.c @@ -63,7 +63,11 @@ int getAbsPath(char *buf, size_t bufSize, char *fname) { // get dir path and attach file name char *dir = dirname(path); memset(buf, 0, bufSize); - sprintf(buf, "%s/%s", dir, fname); + if (!strcmp(dir, "/")) { + sprintf(buf, "/%s", fname); + } else { + sprintf(buf, "%s/%s", dir, fname); + } LOG(logDEBUG1, ("full path for %s: %s\n", fname, buf)); return OK; } @@ -689,14 +693,8 @@ int deleteOldServers(char *mess, char *newServerPath, char *errorPrefix) { currentBinary[len] = '\0'; LOG(logDEBUG1, ("Current binary:%s\n", currentBinary)); - // resolve double slashes to compare - char *newBinary = newServerPath; - while (newBinary[0] == '/' && newBinary[1] == '/') { - ++newBinary; - } - // if current binary same as new server name, replaced anyway - if (strcmp(currentBinary, newBinary)) { + if (strcmp(currentBinary, newServerPath)) { if (deleteFile(mess, currentBinary, errorPrefix) == FAIL) { LOG(logWARNING, ("(%s). Could not delete old servers\n", errorPrefix)); @@ -708,4 +706,4 @@ int deleteOldServers(char *mess, char *newServerPath, char *errorPrefix) { } return OK; -} \ No newline at end of file +} diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 71b44521d..f61ff9ef3 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -11,5 +11,5 @@ #define APIGOTTHARD 0x220328 #define APIGOTTHARD2 0x220328 #define APIJUNGFRAU 0x220328 -#define APIMYTHEN3 0x220328 +#define APIMYTHEN3 0x220401 #define APIMOENCH 0x220328