Skip to content

Conversation

@ptisserand
Copy link
Collaborator

A path is 'remote' if net.url.Parse(path).Scheme is not empty.
TwoTier.RemoteLocalPath convert URL to local path which is then use for storage,cache and thumbnails.

Since I'm far from an expert level in golang, I'm not sure this is the right way to handle this part.
Please note this a work in progress since I think that security is not handled with this patch.

A path is 'remote' if net.url.Parse(path).Scheme is not empty.
TwoTier.RemoteLocalPath convert URL to local path which is then use for storage,cache and thumbnails.
return s.Cache.LoadCache(walkFn)
}

func (s *TwoTier) RemoteToLocalPath(path string) (string, bool) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (s *TwoTier) RemoteToLocalPath(path string) (string, bool) {
func (s *TwoTier) remoteToLocalPath(path string) (string, bool) {

Unexport this function.

@sudokai
Copy link
Owner

sudokai commented Nov 29, 2018

Sorry again for the delays, I'm working on a rewrite of the caching layer and won't be available until I finish that. I will come back to this PR as soon as possible.

@ptisserand
Copy link
Collaborator Author

No problem, I really understand since I'm also quite busy with work on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants