(srcPath, dstPath string)
| 654 | } |
| 655 | |
| 656 | func applyDecompressOwnership(srcPath, dstPath string) error { |
| 657 | info, err := os.Lstat(srcPath) |
| 658 | if err != nil { |
| 659 | return err |
| 660 | } |
| 661 | stat, ok := info.Sys().(*unix.Stat_t) |
| 662 | if !ok { |
| 663 | return nil |
| 664 | } |
| 665 | if info.Mode()&os.ModeSymlink != 0 { |
| 666 | return os.Lchown(dstPath, int(stat.Uid), int(stat.Gid)) |
| 667 | } |
| 668 | return os.Chown(dstPath, int(stat.Uid), int(stat.Gid)) |
| 669 | } |
| 670 | |
| 671 | func (f *FileService) GetContent(op request.FileContentReq) (response.FileInfo, error) { |
| 672 | if files.ShouldDenySensitiveFileRead(op.Path) { |
no test coverage detected