Skip to content

Commit 6e2c8e7

Browse files
Fix error message in local traverser (issue #849) (#1713)
* Log the failure to scan local files to help debugging * return error trace as well. Co-authored-by: Adele Reed <adreed@microsoft.com>
1 parent e2673aa commit 6e2c8e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/zc_traverser_local.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"path/filepath"
3030
"strings"
3131

32+
"github.com/Azure/azure-pipeline-go/pipeline"
3233
"github.com/Azure/azure-storage-azcopy/v10/common"
3334
"github.com/Azure/azure-storage-azcopy/v10/common/parallel"
3435
)
@@ -305,7 +306,8 @@ func (t *localTraverser) Traverse(preprocessor objectMorpher, processor objectPr
305306
singleFileInfo, isSingleFile, err := t.getInfoIfSingleFile()
306307

307308
if err != nil {
308-
return fmt.Errorf("cannot scan the path %s, please verify that it is a valid", t.fullPath)
309+
azcopyScanningLogger.Log(pipeline.LogError, fmt.Sprintf("Failed to scan path %s: %s", t.fullPath, err.Error()))
310+
return fmt.Errorf("failed to scan path %s due to %s", t.fullPath, err.Error())
309311
}
310312

311313
// if the path is a single file, then pass it through the filters and send to processor

0 commit comments

Comments
 (0)