mirror of
https://github.com/jarun/advcpmv.git
synced 2026-02-01 13:17:41 +01:00
fix NULL in middle of spawn and typecast
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
diff -aur coreutils-9.0/src/copy.c coreutils-9.0-patched/src/copy.c
|
||||
--- coreutils-9.0/src/copy.c 2021-09-24 13:31:05.000000000 +0200
|
||||
+++ coreutils-9.0-patched/src/copy.c 2022-02-13 16:09:25.450003849 +0100
|
||||
+++ coreutils-9.0-patched/src/copy.c 2022-02-14 21:04:58.552402945 +0100
|
||||
@@ -129,6 +129,133 @@
|
||||
dev_t dev;
|
||||
};
|
||||
@@ -464,7 +464,7 @@ diff -aur coreutils-9.0/src/copy.c coreutils-9.0-patched/src/copy.c
|
||||
if (x->preserve_timestamps)
|
||||
diff -aur coreutils-9.0/src/copy.h coreutils-9.0-patched/src/copy.h
|
||||
--- coreutils-9.0/src/copy.h 2021-09-24 13:31:05.000000000 +0200
|
||||
+++ coreutils-9.0-patched/src/copy.h 2022-02-13 16:09:25.454003885 +0100
|
||||
+++ coreutils-9.0-patched/src/copy.h 2022-02-14 21:04:58.564403350 +0100
|
||||
@@ -236,6 +236,11 @@
|
||||
Create destination directories as usual. */
|
||||
bool symbolic_link;
|
||||
@@ -502,7 +502,7 @@ diff -aur coreutils-9.0/src/copy.h coreutils-9.0-patched/src/copy.h
|
||||
#endif
|
||||
diff -aur coreutils-9.0/src/cp.c coreutils-9.0-patched/src/cp.c
|
||||
--- coreutils-9.0/src/cp.c 2021-09-24 13:31:05.000000000 +0200
|
||||
+++ coreutils-9.0-patched/src/cp.c 2022-02-13 16:09:25.454003885 +0100
|
||||
+++ coreutils-9.0-patched/src/cp.c 2022-02-14 21:04:58.572403620 +0100
|
||||
@@ -131,6 +131,9 @@
|
||||
{"symbolic-link", no_argument, NULL, 's'},
|
||||
{"target-directory", required_argument, NULL, 't'},
|
||||
@@ -564,7 +564,7 @@ diff -aur coreutils-9.0/src/cp.c coreutils-9.0-patched/src/cp.c
|
||||
+ FILE *fp ;
|
||||
+ char output[1024];
|
||||
+ char fcmd[] = "find";
|
||||
+ fp = spawn(fcmd, (char *[]){ fcmd, file[0], NULL, "-type", "f", NULL });
|
||||
+ fp = spawn(fcmd, (char *[]){ fcmd, file[0], "-type", "f", NULL });
|
||||
+ if ( fp == NULL)
|
||||
+ printf("failed to run find\r");
|
||||
+ else
|
||||
@@ -718,7 +718,7 @@ diff -aur coreutils-9.0/src/cp.c coreutils-9.0-patched/src/cp.c
|
||||
version_control_string)
|
||||
diff -aur coreutils-9.0/src/mv.c coreutils-9.0-patched/src/mv.c
|
||||
--- coreutils-9.0/src/mv.c 2021-09-24 13:31:05.000000000 +0200
|
||||
+++ coreutils-9.0-patched/src/mv.c 2022-02-13 16:09:25.458003920 +0100
|
||||
+++ coreutils-9.0-patched/src/mv.c 2022-02-14 21:04:58.580403890 +0100
|
||||
@@ -66,6 +66,9 @@
|
||||
{"target-directory", required_argument, NULL, 't'},
|
||||
{"update", no_argument, NULL, 'u'},
|
||||
@@ -759,7 +759,7 @@ diff -aur coreutils-9.0/src/mv.c coreutils-9.0-patched/src/mv.c
|
||||
+ FILE *fp ;
|
||||
+ char output[1024];
|
||||
+ char fcmd[] = "find";
|
||||
+ fp = spawn(fcmd, (char *[]){ fcmd, (unsigned char *)(size_t)source, NULL, "-type", "f", NULL });
|
||||
+ fp = spawn(fcmd, (char *[]){ fcmd, (char *)source, "-type", "f", NULL });
|
||||
+ if ( fp == NULL)
|
||||
+ printf("failed to run find\r");
|
||||
+ else
|
||||
|
||||
Reference in New Issue
Block a user