@@ -23,11 +23,11 @@ import (
2323)
2424
2525const (
26- pycExt = ".pyc"
27- pyoExt = ".pyo"
28- pycacheDir = "/__pycache__/"
29- pycache = "__pycache__"
30- defaultReportName = "creport.json"
26+ pycExt = ".pyc"
27+ pyoExt = ".pyo"
28+ pycacheDir = "/__pycache__/"
29+ pycache = "__pycache__"
30+ defaultReportName = "creport.json"
3131 defaultArtifactDirName = "/opt/dockerslim/artifacts"
3232)
3333
@@ -182,7 +182,7 @@ func (p *artifactStore) saveArtifacts() {
182182 }
183183
184184 var paths map [string ]bool
185- for _ ,pathValue := range pathList {
185+ for _ , pathValue := range pathList {
186186 pathInfo , err := os .Stat (pathValue )
187187 if err != nil {
188188 log .Debug ("saveArtifacts.preparePaths(): skipping path = " , pathValue )
@@ -201,8 +201,8 @@ func (p *artifactStore) saveArtifacts() {
201201
202202 includePaths = preparePaths (p .cmd .Includes )
203203 excludePaths = preparePaths (p .cmd .Excludes )
204- log .Debugf ("includePaths: %+v\n " ,includePaths )
205- log .Debugf ("excludePaths: %+v\n " ,excludePaths )
204+ log .Debugf ("includePaths: %+v\n " , includePaths )
205+ log .Debugf ("excludePaths: %+v\n " , excludePaths )
206206
207207 //TODO: use exludePaths to filter discovered files
208208 for fileName := range p .fileMap {
@@ -242,17 +242,17 @@ func (p *artifactStore) saveArtifacts() {
242242 for inPath , isDir := range includePaths {
243243 dstPath := fmt .Sprintf ("%s/files%s" , p .storeLocation , inPath )
244244 if isDir {
245- err , errs := utils .CopyDir (inPath ,dstPath ,true ,true ,nil ,nil ,nil )
246- if err != nil {
247- log .Warnf ("CopyDir(%v,%v) error: %v\n " ,inPath ,dstPath ,err )
248- }
249-
250- if len (errs ) > 0 {
251- log .Warnf ("CopyDir(%v,%v) copy errors: %+v\n " ,inPath ,dstPath ,errs )
252- }
245+ err , errs := utils .CopyDir (inPath , dstPath , true , true , nil , nil , nil )
246+ if err != nil {
247+ log .Warnf ("CopyDir(%v,%v) error: %v\n " , inPath , dstPath , err )
248+ }
249+
250+ if len (errs ) > 0 {
251+ log .Warnf ("CopyDir(%v,%v) copy errors: %+v\n " , inPath , dstPath , errs )
252+ }
253253 } else {
254- if err := utils .CopyFile (inPath ,dstPath ,true ); err != nil {
255- log .Warnf ("CopyFile(%v,%v) error: %v\n " ,inPath ,dstPath ,err )
254+ if err := utils .CopyFile (inPath , dstPath , true ); err != nil {
255+ log .Warnf ("CopyFile(%v,%v) error: %v\n " , inPath , dstPath , err )
256256 }
257257 }
258258 }
0 commit comments