about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--xe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xe.c b/xe.c
index 664d3e2..846a28e 100644
--- a/xe.c
+++ b/xe.c
@@ -504,7 +504,7 @@ perc_subst(char *pat, char *base, char *arg)
 	size_t l;
 	char *dir = base;
 
-	if (arg[0] == '@' && !arg[1])
+	if (strcmp(arg, replace) == 0)
 		return base;
 
 	if (!strchr(pat, '/')) {
@@ -654,9 +654,9 @@ main(int argc, char *argv[], char *envp[])
 	}
 
 	if (pflag) {
-		if (maxatonce != 1 || replace != default_replace) {
+		if (maxatonce != 1) {
 			fprintf(stderr,
-			    "xe: -p cannot be used together with -N or -I.\n");
+			    "xe: -p cannot be used together with -N.\n");
 			exit(1);
 		}