From b9f7caabe1b36f23234788d6514c4e54b5adb168 Mon Sep 17 00:00:00 2001 From: "L. Bradley LaBoon" Date: Fri, 13 Mar 2015 09:36:36 -0400 Subject: [PATCH] Bug fix with execlp() --- backly.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backly.c b/backly.c index bea78a6..779ff80 100644 --- a/backly.c +++ b/backly.c @@ -259,7 +259,7 @@ void copyNew(char *src, int srcPrefix, char *dest, int destPrefix, int testMode) // Only copy file if it doesn't exist or has changed if (needToCopy == 1) { - printf("+ %s 100.00%", itemSrc + srcPrefix); + printf("+ %s 100.00%%", itemSrc + srcPrefix); fflush(stdout); if (testMode == 0) { int pid = fork(); @@ -267,7 +267,7 @@ void copyNew(char *src, int srcPrefix, char *dest, int destPrefix, int testMode) fprintf(stderr, "Could not fork: %s\n", strerror(errno)); continue; } else if (pid == 0) { - execlp("cp", "cp", "-f --preserve=timestamps", itemSrc, itemDest, (char *) NULL); + execlp("cp", "cp", "-f", "--preserve=timestamps", itemSrc, itemDest, (char *) NULL); } else { struct stat srcStat, destStat; double pDone = 0;