tail: pass the right path for Windows guests

Call windows_path with the actual path to resolve, instead of a null
pointer ('filename' is still null at that point), so Windows paths can
be properly resolved.
This commit is contained in:
Pino Toscano
2017-03-03 13:02:00 +01:00
parent be82ba38df
commit df6cd83872

View File

@@ -309,7 +309,7 @@ do_tail (int argc, char *argv[], /* list of files in the guest */
CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL;
if (windows) {
filename = windows_path (g, root, filename, 1 /* readonly */);
filename = windows_path (g, root, argv[i], 1 /* readonly */);
if (filename == NULL)
return -1; /* windows_path printed an error */
}