Merge pull request #784 from harshavardhana/pr_out_ignore_readlink_errors
This commit is contained in:
@@ -77,12 +77,20 @@ func doList(clnt client.Client, recursive bool) error {
|
||||
var err error
|
||||
for contentCh := range clnt.List(recursive) {
|
||||
if contentCh.Err != nil {
|
||||
if os.IsNotExist(iodine.ToError(contentCh.Err)) {
|
||||
if os.IsNotExist(iodine.ToError(contentCh.Err)) || os.IsPermission(iodine.ToError(contentCh.Err)) {
|
||||
console.Errorln(iodine.ToError(contentCh.Err))
|
||||
continue
|
||||
}
|
||||
switch err := iodine.ToError(contentCh.Err).(type) {
|
||||
case *os.PathError:
|
||||
if err.Op == "readlink" {
|
||||
console.Errorln(iodine.ToError(contentCh.Err))
|
||||
continue
|
||||
}
|
||||
}
|
||||
err = contentCh.Err
|
||||
break
|
||||
|
||||
}
|
||||
console.Println(parseContent(contentCh.Content))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user