Route every extension bank-directory lookup through one bankRootOf seam
The pure bankRootFor(rppPath, unsavedRoot) and the shell bankRootOf(ReaProject*) replace eleven hand-rolled .rpp-parent derivations. No unsaved root is supplied yet, so behaviour and refusals are unchanged. Save-As relocation now reads the stored lastBankRoot_.
This commit is contained in:
@@ -106,6 +106,12 @@ std::string projectDirOfRpp(const std::string& rppPath) {
|
||||
return normalizeSlashes(dir);
|
||||
}
|
||||
|
||||
std::string bankRootFor(const std::string& rppPath, const std::string& unsavedRoot) {
|
||||
const std::string projectDir = projectDirOfRpp(rppPath);
|
||||
if (!projectDir.empty()) return projectDir;
|
||||
return normalizeSlashes(unsavedRoot);
|
||||
}
|
||||
|
||||
BankRelocation deriveRelocationPlan(const std::string& oldProjectDir,
|
||||
const std::string& newProjectDir) {
|
||||
BankRelocation r;
|
||||
|
||||
Reference in New Issue
Block a user