Don't use full path for file_remote
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 18 Mar 2017 09:29:39 +0000 (10:29 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 18 Mar 2017 09:29:39 +0000 (10:29 +0100)
nmrp.c

diff --git a/nmrp.c b/nmrp.c
index 722fe752c7f720344c633985d353908c31348886..a25a78a2514b5fc724b2f568ef38f1c6fc546079 100644 (file)
--- a/nmrp.c
+++ b/nmrp.c
@@ -570,8 +570,8 @@ int nmrp_do(struct nmrpd_args *args)
                                        }
                                        printf("Received upload request: filename '%s'.\n", filename);
                                } else if (!args->file_remote) {
-                                       args->file_remote = args->file_local;
-                                       printf("Received upload request with empty filename.\n");
+                                       args->file_remote = leafname(args->file_local);
+                                       printf("Received upload request without filename.\n");
                                }
 
                                status = 0;