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

Fix relative paths #466

Merged
merged 1 commit into from
Dec 3, 2023
Merged

Fix relative paths #466

merged 1 commit into from
Dec 3, 2023

Conversation

fjtrujy
Copy link
Member

@fjtrujy fjtrujy commented Dec 3, 2023

Description

This PR improves the method that transforms the relative path into absolute paths, something needs to support POSIX functions with relative paths.

Specific content for cwd and paths has been moved to a separate file.

The returned error for several functions has been improved.

Once again the base code has been taken from the PSPSDK.

Cheers.

ee/libcglue/src/glue.c Outdated Show resolved Hide resolved
strcpy(b_fname, "host:");
strcpy(b_fname + 5, __direct_pwd);
if (!(__direct_pwd[b_fname_len - 1] == '/' || __direct_pwd[b_fname_len - 1] == '\\')) { // does it has trailing slash ?
if(isCdromPath(b_fname)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this thing really needed?
I don't know why but it compares If unit is cdrom and then adding \\ is that something legacy? maybe from windows?

@uyjulian @rickgaiser , do you know something about this?

Copy link
Member

Choose a reason for hiding this comment

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

This is the correct behavior. In the versions of cdvdman I've checked CdSearchFile checks for backslashes (and not forward slashes)

Copy link
Member

@uyjulian uyjulian left a comment

Choose a reason for hiding this comment

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

Lgtm

@uyjulian uyjulian merged commit 1640135 into ps2dev:master Dec 3, 2023
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants