Displaying 1 result from an estimated 1 matches for "89344d8".
Did you mean:
839e4d8
2015 Sep 30
1
[PATCH v2] copy-in: error out early if the localpath does not exist
---
src/copy-in-out.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/copy-in-out.c b/src/copy-in-out.c
index d5e7fb0..89344d8 100644
--- a/src/copy-in-out.c
+++ b/src/copy-in-out.c
@@ -46,6 +46,12 @@ guestfs_impl_copy_in (guestfs_h *g,
size_t buf_len = strlen (localpath) + 1;
char buf[buf_len];
const char *dirname, *basename;
+ struct stat statbuf;
+
+ if (stat (localpath, &statbuf) == -1) {
+ error (g,...