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

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 #2403

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
From 0f77459cdb1c457aee09a83aff8f8f18707541c6 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.ander...@canonical.com>
Date: Tue, 20 Sep 2016 12:30:29 -0600
Subject: [PATCH] make the target directory on recursive pull

Closes #2403

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
---
 lxc/file.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxc/file.go b/lxc/file.go
index 218c33e..d143a20 100644
--- a/lxc/file.go
+++ b/lxc/file.go
@@ -245,6 +245,10 @@ func (c *fileCmd) pull(config *lxd.Config, args []string) 
error {
                }
 
                if c.recursive {
+                       if err := os.MkdirAll(target, 0755); err != nil && 
!os.IsExist(err) {
+                               return err
+                       }
+
                        if err := d.RecursivePullFile(container, pathSpec[1], 
target); err != nil {
                                return err
                        }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to