MCPcopy
hub / github.com/rclone/rclone / unwrapRemote

Method unwrapRemote

backend/cache/cache.go:622–636  ·  view source on GitHub ↗
(remote string)

Source from the content-addressed store, hash-verified

620}
621
622func (f *Fs) unwrapRemote(remote string) string {
623 remote = cleanPath(remote)
624 if remote != "" {
625 // if it's wrapped by crypt we need to check what format we got
626 if cryptFs, yes := f.isWrappedByCrypt(); yes {
627 _, err := cryptFs.DecryptFileName(remote)
628 // if it failed to decrypt then it is a decrypted format and we need to encrypt it
629 if err != nil {
630 return cryptFs.EncryptFileName(remote)
631 }
632 // else it's an encrypted format and we can use it as it is
633 }
634 }
635 return remote
636}
637
638func (f *Fs) httpExpireRemote(ctx context.Context, in rc.Params) (out rc.Params, err error) {
639 out = make(rc.Params)

Callers 2

httpExpireRemoteMethod · 0.95
rcFetchMethod · 0.95

Calls 4

isWrappedByCryptMethod · 0.95
cleanPathFunction · 0.85
DecryptFileNameMethod · 0.45
EncryptFileNameMethod · 0.45

Tested by

no test coverage detected