Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

There are more than 3 OS in the world... #4

Merged
merged 2 commits into from
Aug 5, 2018
Merged

Conversation

andoriyu
Copy link
Contributor

On anything other than Windows/macOS/Linux this fails to build because lib.rs suggests using lin.rs, while lib.rs doesn't exist for anything other than Linux.

tl;dr: fixes freebsd and other bsd builds.

Cheers.

@dwijnand
Copy link
Contributor

I think the changes in lib.rs are inspired from https://github.com/soc/directories-rs/pull/28/files, so I think the cfg attributes in lin/mac/win.rs can be dropped entirely.

@andoriyu
Copy link
Contributor Author

@dwijnand what's the difference between dirs and directories?

@andoriyu
Copy link
Contributor Author

Probably. Since modules included only when the target matches anyway.

@dwijnand
Copy link
Contributor

dwijnand commented Aug 1, 2018

dirs is more low-level than directories.

Also:

  • The dirs library is a low-level crate designed to provide the paths to standard directories
    as defined by operating systems rules or conventions. If your requirements are more complex,
    e. g. computing cache, config, etc. paths for specific applications or projects, consider using
    directories instead.

(https://github.com/soc/dirs-rs#design-goals)

and the comparison table at https://github.com/soc/dirs-rs#comparison

Copy link
Contributor

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

LGTM

@soc soc merged commit 6aef1bb into dirs-dev:master Aug 5, 2018
@soc
Copy link
Collaborator

soc commented Aug 5, 2018

Thanks to @andoriyu for the PR, and thanks to @dwijnand for the review. I squashed and merged it.

I think there are more changes necessary to reach the platform support of former env::home_dir, but it's a great start! (I have some related ideas for Redox, but that's a long way out.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants