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

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: anatoly techtonik <[email protected]>
From e0090661fa39692fccfbd6e2338e9ac95b69efec Mon Sep 17 00:00:00 2001
From: anatoly techtonik <[email protected]>
Date: Thu, 27 Apr 2017 23:46:25 +0300
Subject: [PATCH] Fix #3240 - file push broken on windows with 2.13

Signed-off-by: anatoly techtonik <[email protected]>
---
 lxc/file.go | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lxc/file.go b/lxc/file.go
index dc1051a..679c00e 100644
--- a/lxc/file.go
+++ b/lxc/file.go
@@ -6,7 +6,6 @@ import (
        "io/ioutil"
        "os"
        "path"
-       "path/filepath"
        "strconv"
        "strings"
        "syscall"
@@ -87,10 +86,8 @@ func (c *fileCmd) push(config *lxd.Config, send_file_perms 
bool, args []string)
        // re-add leading / that got stripped by the SplitN
        targetPath := "/" + pathSpec[1]
        // clean various /./, /../, /////, etc. that users add (#2557)
-       targetPath, err := filepath.Abs(targetPath)
-       if err != nil {
-               return fmt.Errorf(i18n.G("Could not sanitize path %s"), 
targetPath)
-       }
+       targetPath = path.Clean(targetPath)
+
        // normalization may reveal that path is still a dir, e.g. /.
        if strings.HasSuffix(targetPath, "/") {
                targetIsDir = true
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to