Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] mkdir err, in rrframework/storage/local.go #64

Closed
czlhs opened this issue Aug 14, 2018 · 1 comment
Closed

[bug] mkdir err, in rrframework/storage/local.go #64

czlhs opened this issue Aug 14, 2018 · 1 comment

Comments

@czlhs
Copy link

czlhs commented Aug 14, 2018

func CreateLocalDiskStorage(dir string) StorageWrapper {
	// create dir
	if _, err := os.Stat(dir); os.IsNotExist(err) {
               // here the dirctory FileMode is error 
		os.MkdirAll(dir, os.ModePerm)
	}
	// check dir
	s := &LocalDiskStorage{
		Dir: strings.TrimSuffix(dir, "/"),
	}
	return s
}
@songtianyi
Copy link
Owner

fixed.

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

No branches or pull requests

2 participants