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.
---
cat/tail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cat/tail.c b/cat/tail.c
index 8785d45..51da5fc 100644
--- a/cat/tail.c
+++ b/cat/tail.c
@@ -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 */
}
--
2.9.3