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

%DOCUMENTS% on windows #7554

Closed
baconpaul opened this issue Mar 3, 2024 · 1 comment
Closed

%DOCUMENTS% on windows #7554

baconpaul opened this issue Mar 3, 2024 · 1 comment
Labels
Feature Request New feature request Infrastructure Issues related to repository, CI/CD, installers, etc.

Comments

@baconpaul
Copy link
Collaborator

Right now our user data path search looks like

look for SurgeXTUserData
then do a known folder on FOLDERID_Documents
else throw a pile of errors

Here's what I think it should be, in pseudo-code

std::vector<fs::path> locationsInOrder;

(current find-surge-xt-user-data code)
if (portable dir exists and is a directory)
   locationsInOrder-push_back(surge xt user data);

try
{
   locationsInOrder.push_back(DocumentsTolder)
}
catch {}

try
{
locationsInOrder.push_back(knownFolder(FOLDERID_LocalAppData) / SurgeXT)
}
catch {}

if (locaionsInOrder.empty())
{
   userDataPath = "/not/set"; reportError();
}
else
{
   for (const auto &l : locationsInOrder)
   {
     if (fs::is_directory(l / "Patches")
     {
        // already set up
        userDatPath = l; break;
     }
  }
  if (userDataPath.empty()) userDataPath = locationsInOrder.front();
}
@baconpaul baconpaul added the Feature Request New feature request label Mar 3, 2024
@mkruselj mkruselj added the Infrastructure Issues related to repository, CI/CD, installers, etc. label Mar 3, 2024
@mkruselj mkruselj added this to the Surge XT 1.x milestone Mar 13, 2024
@mkruselj mkruselj modified the milestones: Surge XT 1.x, Surge XT 1.3.2 May 8, 2024
@mkruselj
Copy link
Collaborator

mkruselj commented May 8, 2024

Done for XT 1.3.2.

@mkruselj mkruselj closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature request Infrastructure Issues related to repository, CI/CD, installers, etc.
Projects
None yet
Development

No branches or pull requests

2 participants