surge icon indicating copy to clipboard operation
surge copied to clipboard

We should use fs::path everywhere in SurgeStorage

Open baconpaul opened this issue 2 years ago • 6 comments

datapath and userdatapath are of type std::string as are the subordinate ones I just added (in an attempt to start to centralize those paths). And then deal with the dup of sub-paths in the FX Preset Manager and other places.

We should make these all fs::path and promulgate that throughout the code base.

@mvf I know you are doing some cleanup on various file system things still so wanted to bring this to your attention. I'm happy to do it of course but if you are looking at the code thinking 'why isn't that an fs::path' the reason is because ... well ... it should be :)

baconpaul avatar Aug 10 '21 23:08 baconpaul

This is definitely on my radar. I had only stopped working on it because it wasn't clear which parts of the code would remain after the JUCE switch. Still have bits & pieces sitting around on branches. Some of it should still be relevant.

mvf avatar Aug 11 '21 14:08 mvf

yeah we are all stable at this point in that regard!

baconpaul avatar Aug 11 '21 14:08 baconpaul

I'm just banging this one out right now so we can get it before beta

baconpaul avatar Sep 09 '21 22:09 baconpaul

Reopening, #5041 didn't really achieve what this issue is about. It made the members fs::path alright, but didn't adapt the implementation to benefit from the switch. It even introduced some additional conversions, i.e. we now have fs::pathstd::stringfs::path in some places.

mvf avatar Sep 16 '21 05:09 mvf

Oh ha I thought I got most of those! Lest make a list of the spots to fix still indeed

baconpaul avatar Sep 16 '21 10:09 baconpaul

We should continue to do this as we go, but I'm going to remove it as a blocker from the XT1 milestone. We already did a lot but getting 'the rest' will be a continuous background task.

@mvf if you decide you do want to do a bunch of fs::path conversion here and there, we probably start a beta freeze around Dec1. Feel free to do what you want before then of course, but otherwise we will push the 'rest' of these into XT2.

baconpaul avatar Nov 18 '21 01:11 baconpaul