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

There is an ambiguity in the use of the method fileutil.CreateDir #115

Closed
J404J opened this issue Jul 8, 2023 · 5 comments
Closed

There is an ambiguity in the use of the method fileutil.CreateDir #115

J404J opened this issue Jul 8, 2023 · 5 comments

Comments

@J404J
Copy link

J404J commented Jul 8, 2023

There is an ambiguity in fileutil.CreateDir, the incoming path must end with /.
I input /a/b/c but create /a/b.
Since the function's name is CreateDir, the input params is dir not a file.
It is recommended that the semantics of the function be consistent with the mkdir -p command of the operating system, that will not cause ambiguity.
mkdir -p /a/b/c will create /a/b/c not /a/b

@J404J
Copy link
Author

J404J commented Jul 8, 2023

remove path.Dir(absPath) -> os.MkdirAll(absPath, os.ModePerm)

@duke-git
Copy link
Owner

okay, will fix it in next release.

@J404J
Copy link
Author

J404J commented Jul 10, 2023

okay, will fix it in next release.

thank you!

@duke-git
Copy link
Owner

duke-git commented Aug 1, 2023

fixed in v2.2.4

@duke-git duke-git closed this as completed Aug 1, 2023
@J404J
Copy link
Author

J404J commented Aug 1, 2023

fixed in v2.2.4

thank you!

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