[lxc-devel] [lxd/master] Fix file transfers to/from stdin/stdout in snap

stgraber on Github lxc-bot at linuxcontainers.org
Fri Oct 20 21:51:21 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171020/e17edea8/attachment.bin>
-------------- next part --------------
From 27ccdda645df9b60a1ac4b6485a08311b99c0190 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 20 Oct 2017 17:50:43 -0400
Subject: [PATCH] Fix file transfers to/from stdin/stdout in snap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 shared/util.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/shared/util.go b/shared/util.go
index d0be6eff5..ac32d967c 100644
--- a/shared/util.go
+++ b/shared/util.go
@@ -109,6 +109,11 @@ func HostPath(path string) string {
 		return path
 	}
 
+	// Don't prefix stdin/stdout
+	if path == "-" {
+		return path
+	}
+
 	// Check if we're running in a snap package
 	snap := os.Getenv("SNAP")
 	if snap == "" {


More information about the lxc-devel mailing list