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

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 <stgra...@ubuntu.com>
From 43ec7184b1987399b37459618ff68d4a8f6dce8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 5 Oct 2020 18:22:21 -0400
Subject: [PATCH] lxc: Better handle copy/move between projects
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxc/copy.go | 2 +-
 lxc/move.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxc/copy.go b/lxc/copy.go
index be3d576f68..7b88270ee4 100644
--- a/lxc/copy.go
+++ b/lxc/copy.go
@@ -403,7 +403,7 @@ func (c *cmdCopy) copyInstance(conf *config.Config, 
sourceResource string, destR
        }
 
        // If choosing a random name, show it to the user
-       if destResource == "" {
+       if destResource == "" && c.flagTargetProject == "" {
                // Get the successful operation data
                opInfo, err := op.GetTarget()
                if err != nil {
diff --git a/lxc/move.go b/lxc/move.go
index 182021c0f4..8a1b812976 100644
--- a/lxc/move.go
+++ b/lxc/move.go
@@ -64,7 +64,7 @@ func (c *cmdMove) Run(cmd *cobra.Command, args []string) 
error {
        conf := c.global.conf
 
        // Sanity checks
-       if c.flagTarget == "" {
+       if c.flagTarget == "" && c.flagTargetProject == "" {
                exit, err := c.global.CheckArgs(cmd, args, 2, 2)
                if exit {
                        return err
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to