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

Absolute file paths on linux #40

Closed
krisvanneste opened this issue Jun 26, 2023 · 6 comments
Closed

Absolute file paths on linux #40

krisvanneste opened this issue Jun 26, 2023 · 6 comments

Comments

@krisvanneste
Copy link
Collaborator

When running sourcespec on our linux server, I experience a problem with the path to the output folder. If I specify an absolute path (e.g. /mnt/geoserver/Belshake/sourcespec), the output is written to a folder relative to the working directory (e.g. /home/kris/mnt/geoserver/Belshake/sourcespec). On Windows, this does not happen.

The problem seems to be situated in the move_outdir function in ssp_setup.py:

    path = os.path.normpath(config.options.outdir).split(os.sep)
    dst = os.path.join(*path[:-1], str(evid))

Leading slashes are removed in dst. Is this intentional? I didn't change anything, but solved it by running everything from the root folder...

@claudiodsf
Copy link
Member

Thanks for reporting this!

It should be now fixed in the main branch.

Could you please double-check on Windows and Linux?

@krisvanneste
Copy link
Collaborator Author

Works both on Windows and Linux!

@claudiodsf
Copy link
Member

Great! Did you also double-check with relative paths, in case there are regressions?

@krisvanneste
Copy link
Collaborator Author

Sorry, no. I will try that too.

@krisvanneste
Copy link
Collaborator Author

Relative paths also work as expected on both platforms.

@claudiodsf
Copy link
Member

Super! Closing!

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