The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4644
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) === Closes #4643 Signed-off-by: Stéphane Graber <[email protected]>
From dfd7906636f1b1ce52076acfad247fa78994e621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <[email protected]> Date: Wed, 13 Jun 2018 07:43:38 -0400 Subject: [PATCH] lxc/{import,export}: Deal with snap paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4643 Signed-off-by: Stéphane Graber <[email protected]> --- lxc/export.go | 3 ++- lxc/import.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lxc/export.go b/lxc/export.go index 8afbac8e8..1a38c2130 100644 --- a/lxc/export.go +++ b/lxc/export.go @@ -10,6 +10,7 @@ import ( "github.com/lxc/lxd/client" "github.com/lxc/lxd/lxc/utils" + "github.com/lxc/lxd/shared" "github.com/lxc/lxd/shared/api" cli "github.com/lxc/lxd/shared/cmd" "github.com/lxc/lxd/shared/i18n" @@ -96,7 +97,7 @@ func (c *cmdExport) Run(cmd *cobra.Command, args []string) error { targetName = "backup.tar.xz" } - target, err := os.Create(targetName) + target, err := os.Create(shared.HostPath(targetName)) if err != nil { return err } diff --git a/lxc/import.go b/lxc/import.go index 4d527afc8..b532a6a7d 100644 --- a/lxc/import.go +++ b/lxc/import.go @@ -6,6 +6,7 @@ import ( "github.com/spf13/cobra" "github.com/lxc/lxd/client" + "github.com/lxc/lxd/shared" cli "github.com/lxc/lxd/shared/cmd" "github.com/lxc/lxd/shared/i18n" ) @@ -49,7 +50,7 @@ func (c *cmdImport) Run(cmd *cobra.Command, args []string) error { resource := resources[0] - file, err := os.Open(args[len(args)-1]) + file, err := os.Open(shared.HostPath(args[len(args)-1])) if err != nil { return nil }
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
