Merge pull request #746 from abperiasamy/recur-url-prefix

prefix with parent path for dir... case
This commit is contained in:
Anand Babu (AB) Periasamy
2015-06-06 15:16:17 -07:00
+5
View File
@@ -18,6 +18,7 @@ package main
import (
"fmt"
"path/filepath"
"runtime"
"strings"
@@ -74,6 +75,10 @@ func doList(clnt client.Client, targetURL string, recursive bool, recursivePrefi
err = contentCh.Err
break
}
if recursive && recursivePrefix != "" {
contentCh.Content.Name = filepath.Join(filepath.Base(targetURL), contentCh.Content.Name)
}
console.Println(parseContent(contentCh.Content))
}
if err != nil {