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

[leo_commons][nfs] The disk free space can be wrong #508

Closed
mocchira opened this issue Nov 8, 2016 · 3 comments
Closed

[leo_commons][nfs] The disk free space can be wrong #508

mocchira opened this issue Nov 8, 2016 · 3 comments
Assignees
Milestone

Comments

@mocchira
Copy link
Member

mocchira commented Nov 8, 2016

As leo_file:file_get_mount_path/1 ( https://github.com/leo-project/leo_commons/blob/1.1.7/src/leo_file.erl#L110 ) doesn't follow every symlink included in a given path.
A path given to that function should be canonicalized as readlink -f does.

@mocchira mocchira added this to the 1.3.1 milestone Nov 8, 2016
@mocchira mocchira self-assigned this Nov 8, 2016
@mocchira
Copy link
Member Author

mocchira commented Nov 9, 2016

memo

According to the report https://groups.google.com/d/msg/leoproject_leofs/4MFbLH9IVj4/MaqXsJHRAgAJ ,
There seems to be another issue. ( still not reproduced )

@mocchira
Copy link
Member Author

mocchira commented Nov 9, 2016

how to implement

don't

os:cmd("readlink -f " ++ FilePath). %% doesn't work on possibly BSD based systems like OSX

instead

do port http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac into erlang with file:read_link_info, filename:basename and filename:dirname.

@yosukehara yosukehara added the v1.3 label Nov 9, 2016
@mocchira
Copy link
Member Author

mocchira commented Nov 9, 2016

impl ( confirmed on osx/linux )

leo-project/leo_commons@aaa39b9

todo

  • add unit tests
  • call leo_file:file_get_canonicalized_path in leo_file:file_get_mount_path

windkit pushed a commit to windkit/leo_commons that referenced this issue Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants