The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4160

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <[email protected]>
From 747d70aeee6cf567b4d1d54cf2cf044e1ce6fa47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]>
Date: Wed, 10 Jan 2018 22:16:29 -0500
Subject: [PATCH] lxc/file: Fix edit in a snap environment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <[email protected]>
---
 lxc/file.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxc/file.go b/lxc/file.go
index 545982d95..d0b5cb127 100644
--- a/lxc/file.go
+++ b/lxc/file.go
@@ -577,7 +577,7 @@ func (c *fileCmd) edit(conf *config.Config, args []string) 
error {
        fname := f.Name()
        f.Close()
        os.Remove(fname)
-       defer os.Remove(fname)
+       defer os.Remove(shared.HostPath(fname))
 
        // Extract current value
        err = c.pull(conf, append([]string{args[0]}, fname))
@@ -585,7 +585,7 @@ func (c *fileCmd) edit(conf *config.Config, args []string) 
error {
                return err
        }
 
-       _, err = shared.TextEditor(fname, []byte{})
+       _, err = shared.TextEditor(shared.HostPath(fname), []byte{})
        if err != nil {
                return err
        }
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to