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

Folder structure can't cross platform #8

Closed
HushmKun opened this issue Jun 26, 2023 · 2 comments
Closed

Folder structure can't cross platform #8

HushmKun opened this issue Jun 26, 2023 · 2 comments
Assignees
Labels
bug Something isn't working fixed Fixed this Issue

Comments

@HushmKun
Copy link
Owner

HushmKun commented Jun 26, 2023

Due to differences between NT Paths & POSIX Paths.

Since this works on windows, It won't follow to UNIX :

[
    {"folder": "src"},
    {"file": "src\\__init__.py"},
    {"folder": "test"},
    {"file": "test\\__init__.py"},
    {"folder": "res"},
    {"file": "README.md"},
    {"file": "setup.py"},
    {"file": "setup.cfg"},
    {"file": "pyproject.toml"},
]

If we wanna work it out on UNIX, It should be :

[
    {"folder": "src"},
    {"file": "src/__init__.py"},
    {"folder": "test"},
    {"file": "test/__init__.py"},
    {"folder": "res"},
    {"file": "README.md"},
    {"file": "setup.py"},
    {"file": "setup.cfg"},
    {"file": "pyproject.toml"},
]

But, of course It won't work on windows.
So we have to either find a common ground or figure a new way.

@HushmKun HushmKun added bug Something isn't working needs-fix Needs fixing labels Jun 26, 2023
@HushmKun HushmKun self-assigned this Jun 26, 2023
@augustus-thomas
Copy link

Hey.

I found a module that might really help us. It is called pathlib. https://docs.python.org/3/library/pathlib.html

I think I might try to refactor my branch to use path objects (when I have time). I'm thinking I can try to convert from JSON to a path straight away.

Sorry I haven't been contributing! I have a full time job right now (not is SWE) and so I do this in spare time or while procrastinating

@HushmKun
Copy link
Owner Author

I found a module that might really help us. It is called pathlib. https://docs.python.org/3/library/pathlib.html

Thanks, @augustus-thomas.
I really did use the Pathlib Module. 😂

This issue is fixed as of 0.1.4

@HushmKun HushmKun added fixed Fixed this Issue and removed needs-fix Needs fixing labels Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Fixed this Issue
Projects
None yet
Development

No branches or pull requests

2 participants