(src, dst string)
| 2931 | } |
| 2932 | |
| 2933 | func fixPy3CacheFile(src, dst string) error { |
| 2934 | dstPyFilePath := py3FileNameFromCache(dst) |
| 2935 | if dstPyFilePath == "" { |
| 2936 | return nil |
| 2937 | } |
| 2938 | |
| 2939 | srcPyFilePath := py3FileNameFromCache(src) |
| 2940 | if srcPyFilePath == "" { |
| 2941 | return nil |
| 2942 | } |
| 2943 | |
| 2944 | if _, err := os.Stat(dstPyFilePath); err != nil && os.IsNotExist(err) { |
| 2945 | //if err := cpFile(srcPyFilePath, dstPyFilePath); err != nil { |
| 2946 | if err := fsutil.CopyRegularFile(true, srcPyFilePath, dstPyFilePath, true); err != nil { |
| 2947 | log.Debugf("sensor: monitor - fixPy3CacheFile - error copying file => %v", dstPyFilePath) |
| 2948 | return err |
| 2949 | } |
| 2950 | } |
| 2951 | |
| 2952 | return nil |
| 2953 | } |
| 2954 | |
| 2955 | func rbEnsureGemFiles(src, storeLocation, prefix string) error { |
| 2956 | if strings.Contains(src, rbDefaultSpecSubDir) { |
no test coverage detected