runscript: rename saveDir back to save to fix compile error
This commit is contained in:
parent
df1f02ac84
commit
370e5c775a
@ -1101,7 +1101,7 @@ runscript(int argc, char **argv)
|
||||
int retval, opt, depoptions = RC_DEP_TRACE;
|
||||
RC_STRING *svc;
|
||||
char path[PATH_MAX], lnk[PATH_MAX];
|
||||
char *dir, *saveDir = NULL, *saveLnk = NULL;
|
||||
char *dir, *save = NULL, *saveLnk = NULL;
|
||||
char pidstr[10];
|
||||
size_t l = 0, ll;
|
||||
const char *file;
|
||||
@ -1133,14 +1133,14 @@ runscript(int argc, char **argv)
|
||||
if (readlink(argv[1], lnk, sizeof(lnk)-1)) {
|
||||
dir = dirname(path);
|
||||
if (strchr(lnk, '/')) {
|
||||
saveDir = xstrdup(dir);
|
||||
save = xstrdup(dir);
|
||||
saveLnk = xstrdup(lnk);
|
||||
dir = dirname(saveLnk);
|
||||
if (strcmp(dir, saveDir) == 0)
|
||||
if (strcmp(dir, save) == 0)
|
||||
file = basename_c(argv[1]);
|
||||
else
|
||||
file = basename_c(lnk);
|
||||
dir = saveDir;
|
||||
dir = save;
|
||||
} else
|
||||
file = basename_c(argv[1]);
|
||||
ll = strlen(dir) + strlen(file) + 2;
|
||||
@ -1150,7 +1150,7 @@ runscript(int argc, char **argv)
|
||||
free(service);
|
||||
service = xstrdup(lnk);
|
||||
}
|
||||
free(saveDir);
|
||||
free(save);
|
||||
free(saveLnk);
|
||||
}
|
||||
if (!service)
|
||||
|
Loading…
Reference in New Issue
Block a user