swift icon indicating copy to clipboard operation
swift copied to clipboard

Remove leading slash for paths to be retrieved

Open KuabeM opened this issue 1 year ago • 4 comments

The leading slash breaks windows compatibility as paths starting with /C:/ can't be resolved on windows, as mentioned here https://github.com/jhavl/swift/commit/f6c8cdea481b713540b5889c0c8c125ca0cc3ac0#r116060265. Removing this leading slash on Linux does not change the behavior, paths like /home/... and //home/... can both be resolved.

Here's the output of the commented print call for self.path[10:] on Linux:

Retrieving file: /home/<redacted>/meshes/link_base_1.STL

And here's the output of the commented print call for self.path[9:]:

Retrieving file: //home/<redacted>/meshes/link_base_1.STL

Is there any reason to keep this for *nix platforms? If yes I'd be happy to add a conditional parsing.

KuabeM avatar Oct 10 '23 10:10 KuabeM

This solved my issue (ISSUE #50)

kappa95 avatar Oct 19 '23 16:10 kappa95

Solved my issue as well. Thanks!

Muhammadsgit avatar Dec 24 '23 21:12 Muhammadsgit

My issue has been solved. Big thanks!

kongyuanchao avatar Feb 27 '24 09:02 kongyuanchao

Thanks @KuabeM , this seem to have solved the issue we were all facing when attempting to load meshes when running a simulation.

@jhavl is there anything that we could do to help getting these changes merged?

apojomovsky avatar Apr 01 '24 03:04 apojomovsky