MSS icon indicating copy to clipboard operation
MSS copied to clipboard

data_dir=/tmp from config editor cannot become stored and used as expected

Open ReimarBauer opened this issue 9 months ago • 2 comments

Using /tmp for the data_dir in the config editor will store this into the msui_settings.json

"data_dir": "/tmp",

but display it as ~/mssdata

Image

The bug is located in the comparison in https://github.com/Open-MSS/MSS/blob/develop/mslib/utils/config.py#L672

we recognized match_type has a bug type(match_type("~/mss")) == StrType while type(c.match_type("/mss")) == FilepathType

This limits currently the path to have a startwith tilde or an fs url definition.

We need a comparison which allows all PyFileSystem2 path definitions. What we see in the editor should be the value which we stored in the file.

ReimarBauer avatar Mar 20 '25 10:03 ReimarBauer

The fix needs to go to stable branch.

ReimarBauer avatar Mar 20 '25 10:03 ReimarBauer

@ReimarBauer I have studied the code base and figured out a solution for this, pls assign me this

levi178u avatar Mar 23 '25 05:03 levi178u

after https://github.com/Open-MSS/MSS/pull/2823 is merged this can be solved using the ideas of 2830 using pathlib.Path itselfs

ReimarBauer avatar Jul 04 '25 06:07 ReimarBauer