ToobAmp: correctlly map default file property for Toob Convolution Reverb.
This commit is contained in:
@@ -118,4 +118,7 @@ namespace pipedal
|
|||||||
std::string ToLower(const std::string&value);
|
std::string ToLower(const std::string&value);
|
||||||
|
|
||||||
std::filesystem::path MakeRelativePath(const std::filesystem::path &path, const std::filesystem::path&parentPath);
|
std::filesystem::path MakeRelativePath(const std::filesystem::path &path, const std::filesystem::path&parentPath);
|
||||||
|
|
||||||
|
bool IsSubdirectory(const std::filesystem::path &path, const std::filesystem::path &basePath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,3 +189,30 @@ std::filesystem::path pipedal::MakeRelativePath(const std::filesystem::path &pat
|
|||||||
return remander;
|
return remander;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool pipedal::IsSubdirectory(const std::filesystem::path &path, const std::filesystem::path &basePath)
|
||||||
|
{
|
||||||
|
auto iPath = path.begin();
|
||||||
|
for (auto i = basePath.begin(); i != basePath.end(); ++i)
|
||||||
|
{
|
||||||
|
if (iPath == path.end())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*i) != (*iPath))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
++iPath;
|
||||||
|
}
|
||||||
|
while (iPath != path.end())
|
||||||
|
{
|
||||||
|
if (iPath->string() == "..")
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
++iPath;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
- Support for LV2 Trigger controls, and MIDI bindings to LV2 trigger controls (common in looper and recording/playback plugsin).
|
- Support for LV2 Trigger controls, and MIDI bindings to LV2 trigger controls (common in looper and recording/playback plugsin).
|
||||||
- MIDI bindings for LV2 trigger controls.
|
- MIDI bindings for LV2 trigger controls.
|
||||||
- Port Web app from CRA to Vite framework to avoid deprecated dependencies.
|
- Port Web app from CRA to Vite framework to avoid deprecated dependencies.
|
||||||
|
- ToobAmp 1.1.57: Correctly set file path of the default file property for Toob Convolution Reverb.
|
||||||
|
|
||||||
## PiPedal 1.3.69
|
## PiPedal 1.3.69
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ cabir:impulseFile3
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
|
|
||||||
TooB Cab IR is a convolution-based guitar cabinet impulse response simulator.
|
TooB Cab IR is a convolution-based guitar cabinet impulse response simulator.
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ toob:frequencyResponseVector
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
|
|
||||||
mod:brand "TooB";
|
mod:brand "TooB";
|
||||||
mod:label "TooB CabSim";
|
mod:label "TooB CabSim";
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ toobimpulse:impulseFile
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
|
|
||||||
Convolution reverb is a notoriously compute-intensive effect. If you are having performance issues, use the Max T control to constrain the length of the impulse file to
|
Convolution reverb is a notoriously compute-intensive effect. If you are having performance issues, use the Max T control to constrain the length of the impulse file to
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ toobimpulse:impulseFile
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ inputStage:filterGroup
|
|||||||
doap:license <https://two-play.com/TooB/licenses/isc> ;
|
doap:license <https://two-play.com/TooB/licenses/isc> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
|
|
||||||
mod:brand "TooB";
|
mod:brand "TooB";
|
||||||
mod:label "TooB Input";
|
mod:label "TooB Input";
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ pstage:stage3
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
|
|
||||||
mod:brand "TooB";
|
mod:brand "TooB";
|
||||||
mod:label "Power Stage";
|
mod:label "Power Stage";
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment "TooB spectrum analyzer" ;
|
rdfs:comment "TooB spectrum analyzer" ;
|
||||||
|
|
||||||
mod:brand "TooB";
|
mod:brand "TooB";
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ tonestack:eqGroup
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
|
|
||||||
uiext:ui <http://two-play.com/plugins/toob-tone-stack-ui>;
|
uiext:ui <http://two-play.com/plugins/toob-tone-stack-ui>;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -40,7 +40,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
Emulation of a Boss CE-2 Chorus.
|
Emulation of a Boss CE-2 Chorus.
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
A straightforward no-frills digital delay.
|
A straightforward no-frills digital delay.
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
Emulation of a Boss BF-2 Flanger, based on circuit analysis and simulation of the original.
|
Emulation of a Boss BF-2 Flanger, based on circuit analysis and simulation of the original.
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
Digital emulation of a Boss BF-2 Flanger.
|
Digital emulation of a Boss BF-2 Flanger.
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
Toob Freeverb is an Lv2 implementation of the famous Freeverb reverb effect. FreeVerb delivers a well-balanced reverb with very little tonal coloration.
|
Toob Freeverb is an Lv2 implementation of the famous Freeverb reverb effect. FreeVerb delivers a well-balanced reverb with very little tonal coloration.
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ toobml:sagGroup
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
The TooB ML Amplifier plugin provides emulation of a variety of amplifiers and overdrive pedals that are implemented
|
The TooB ML Amplifier plugin provides emulation of a variety of amplifiers and overdrive pedals that are implemented
|
||||||
using neural-network-based machine learning models of real amplifiers.
|
using neural-network-based machine learning models of real amplifiers.
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ toobNam:eqGroup
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
A port of Steven Atkinson's Neural Amp Modeler to LV2.
|
A port of Steven Atkinson's Neural Amp Modeler to LV2.
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
doap:license <https://rerdavies.github.io/pipedal/LicenseToobAmp> ;
|
||||||
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
doap:maintainer <http://two-play.com/rerdavies#me> ;
|
||||||
lv2:minorVersion 0 ;
|
lv2:minorVersion 0 ;
|
||||||
lv2:microVersion 56 ;
|
lv2:microVersion 57 ;
|
||||||
rdfs:comment """
|
rdfs:comment """
|
||||||
TooB Tuner is a chromatic guitar tuner.
|
TooB Tuner is a chromatic guitar tuner.
|
||||||
""" ;
|
""" ;
|
||||||
|
|||||||
+38
-1
@@ -50,6 +50,7 @@
|
|||||||
#endif /* NO_MLOCK */
|
#endif /* NO_MLOCK */
|
||||||
|
|
||||||
using namespace pipedal;
|
using namespace pipedal;
|
||||||
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T &constMutex(const T &mutex)
|
T &constMutex(const T &mutex)
|
||||||
@@ -2309,10 +2310,46 @@ void PiPedalModel::SetSystemMidiBindings(std::vector<MidiBinding> &bindings)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FileRequestResult PiPedalModel::GetFileList2(const std::string &relativePath, const UiFileProperty &fileProperty)
|
PedalboardItem*PiPedalModel::GetPedalboardItemForFileProperty(const UiFileProperty& fileProperty)
|
||||||
{
|
{
|
||||||
|
for (PedalboardItem*pedalboardItem: this->pedalboard.GetAllPlugins())
|
||||||
|
{
|
||||||
|
if (pedalboardItem->pathProperties_.contains(fileProperty.patchProperty()))
|
||||||
|
{
|
||||||
|
return pedalboardItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
FileRequestResult PiPedalModel::GetFileList2(const std::string &relativePath_, const UiFileProperty &fileProperty)
|
||||||
|
{
|
||||||
|
std::string relativePath = relativePath_;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (!storage.IsInUploadsDirectory(relativePath))
|
||||||
|
{
|
||||||
|
// if relativePath is in a resource directory of the plugin, then we have loaded a factory preset or are using a default property.
|
||||||
|
// map the resource path to the corresponding file in the uploads directory.
|
||||||
|
// :-(
|
||||||
|
PedalboardItem *pedalboardItem = GetPedalboardItemForFileProperty(fileProperty);
|
||||||
|
if (pedalboardItem)
|
||||||
|
{
|
||||||
|
auto pluginInfo = GetPluginInfo(pedalboardItem->uri());
|
||||||
|
if (pluginInfo) {
|
||||||
|
std::filesystem::path resourcePath = fs::path(pluginInfo->bundle_path())
|
||||||
|
/ fileProperty.resourceDirectory();
|
||||||
|
if (IsSubdirectory(relativePath,resourcePath))
|
||||||
|
{
|
||||||
|
fs::path t = MakeRelativePath(relativePath,resourcePath);
|
||||||
|
t = fileProperty.directory() / t;
|
||||||
|
if (fs::exists(t))
|
||||||
|
{
|
||||||
|
relativePath = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return this->storage.GetFileList2(relativePath, fileProperty);
|
return this->storage.GetFileList2(relativePath, fileProperty);
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ namespace pipedal
|
|||||||
using NetworkChangedListener = std::function<void(void)>;
|
using NetworkChangedListener = std::function<void(void)>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
PedalboardItem* GetPedalboardItemForFileProperty(const UiFileProperty& fileProperty);
|
||||||
|
|
||||||
void CancelAudioRetry();
|
void CancelAudioRetry();
|
||||||
clock::time_point lastRestartTime = clock::time_point::min();
|
clock::time_point lastRestartTime = clock::time_point::min();
|
||||||
|
|||||||
@@ -1547,6 +1547,20 @@ static void createTargetLinks(const std::filesystem::path &sourceDirectory, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string PluginHost::MapResourcePath(const std::string&pluginUri, const std::string&filePath)
|
||||||
|
{
|
||||||
|
auto plugin = GetPluginInfo(pluginUri);
|
||||||
|
if (plugin) {
|
||||||
|
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return filePath;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void PluginHost::CheckForResourceInitialization(const std::string &pluginUri, const std::filesystem::path &pluginUploadDirectory)
|
void PluginHost::CheckForResourceInitialization(const std::string &pluginUri, const std::filesystem::path &pluginUploadDirectory)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -838,6 +838,9 @@ namespace pipedal
|
|||||||
public:
|
public:
|
||||||
virtual MapFeature &GetMapFeature() { return this->mapFeature; }
|
virtual MapFeature &GetMapFeature() { return this->mapFeature; }
|
||||||
void CheckForResourceInitialization(const std::string& pluginUri,const std::filesystem::path& pluginUploadDirectory);
|
void CheckForResourceInitialization(const std::string& pluginUri,const std::filesystem::path& pluginUploadDirectory);
|
||||||
|
|
||||||
|
std::string MapResourcePath(const std::string&uri, const std::string&relativePath);
|
||||||
|
|
||||||
void ReloadPlugins();
|
void ReloadPlugins();
|
||||||
|
|
||||||
// equivalent to LV2 MapPath AbstractPath features.
|
// equivalent to LV2 MapPath AbstractPath features.
|
||||||
|
|||||||
+8
-29
@@ -46,32 +46,6 @@ const char *BANKS_FILENAME = "index.banks";
|
|||||||
|
|
||||||
#define USER_SETTINGS_FILENAME "userSettings.json";
|
#define USER_SETTINGS_FILENAME "userSettings.json";
|
||||||
|
|
||||||
static bool isSubdirectory(const fs::path &path, const fs::path &basePath)
|
|
||||||
{
|
|
||||||
auto iPath = path.begin();
|
|
||||||
for (auto i = basePath.begin(); i != basePath.end(); ++i)
|
|
||||||
{
|
|
||||||
if (iPath == path.end())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*i) != (*iPath))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
++iPath;
|
|
||||||
}
|
|
||||||
while (iPath != path.end())
|
|
||||||
{
|
|
||||||
if (iPath->string() == "..")
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
++iPath;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool hasSyntheticModRoot(const UiFileProperty &fileProperty)
|
static bool hasSyntheticModRoot(const UiFileProperty &fileProperty)
|
||||||
{
|
{
|
||||||
@@ -1755,7 +1729,7 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons
|
|||||||
const ModFileTypes::ModDirectory *modDirectoryInfo = ModFileTypes::GetModDirectory(modDirectory);
|
const ModFileTypes::ModDirectory *modDirectoryInfo = ModFileTypes::GetModDirectory(modDirectory);
|
||||||
if (modDirectoryInfo)
|
if (modDirectoryInfo)
|
||||||
{
|
{
|
||||||
if (isSubdirectory(fsRelativePath, uploadsDirectory / modDirectoryInfo->pipedalPath))
|
if (IsSubdirectory(fsRelativePath, uploadsDirectory / modDirectoryInfo->pipedalPath))
|
||||||
{
|
{
|
||||||
rootModDirectory = modDirectoryInfo;
|
rootModDirectory = modDirectoryInfo;
|
||||||
modDirectoryPath = uploadsDirectory / modDirectoryInfo->pipedalPath;
|
modDirectoryPath = uploadsDirectory / modDirectoryInfo->pipedalPath;
|
||||||
@@ -1766,7 +1740,7 @@ FileRequestResult Storage::GetModFileList2(const std::string &relativePath, cons
|
|||||||
}
|
}
|
||||||
if (modDirectoryPath.empty() && fileProperty.useLegacyModDirectory())
|
if (modDirectoryPath.empty() && fileProperty.useLegacyModDirectory())
|
||||||
{
|
{
|
||||||
if (isSubdirectory(fsRelativePath, uploadsDirectory / fileProperty.directory()))
|
if (IsSubdirectory(fsRelativePath, uploadsDirectory / fileProperty.directory()))
|
||||||
{
|
{
|
||||||
modDirectoryPath = uploadsDirectory / fileProperty.directory();
|
modDirectoryPath = uploadsDirectory / fileProperty.directory();
|
||||||
result.breadcrumbs_.push_back({modDirectoryPath.string(), fs::path(fileProperty.directory()).filename().string()});
|
result.breadcrumbs_.push_back({modDirectoryPath.string(), fs::path(fileProperty.directory()).filename().string()});
|
||||||
@@ -1881,7 +1855,7 @@ FileRequestResult Storage::GetFileList2(const std::string &relativePath_, const
|
|||||||
++iAbsolutePath;
|
++iAbsolutePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isSubdirectory(absolutePath, pluginRootDirectory))
|
if (!IsSubdirectory(absolutePath, pluginRootDirectory))
|
||||||
{
|
{
|
||||||
throw std::runtime_error(SS("Improper location. " << absolutePath));
|
throw std::runtime_error(SS("Improper location. " << absolutePath));
|
||||||
}
|
}
|
||||||
@@ -2239,6 +2213,11 @@ FilePropertyDirectoryTree::ptr Storage::GetFilePropertydirectoryTree(const UiFil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Storage::IsInUploadsDirectory(const std::filesystem::path&path) const
|
||||||
|
{
|
||||||
|
return IsSubdirectory(path,this->GetPluginUploadDirectory());
|
||||||
|
}
|
||||||
|
|
||||||
const PluginPresetIndex &Storage::GetPluginPresetIndex()
|
const PluginPresetIndex &Storage::GetPluginPresetIndex()
|
||||||
{
|
{
|
||||||
return pluginPresetIndex;
|
return pluginPresetIndex;
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ public:
|
|||||||
void MoveBank(int from, int to);
|
void MoveBank(int from, int to);
|
||||||
int64_t DeleteBank(int64_t bankId);
|
int64_t DeleteBank(int64_t bankId);
|
||||||
|
|
||||||
|
bool IsInUploadsDirectory(const std::filesystem::path&path) const;
|
||||||
|
|
||||||
FileRequestResult GetFileList2(const std::string&relativePath,const UiFileProperty&fileProperty);
|
FileRequestResult GetFileList2(const std::string&relativePath,const UiFileProperty&fileProperty);
|
||||||
|
|
||||||
FileRequestResult GetModFileList2(const std::string &relativePath,const UiFileProperty &fileProperty);
|
FileRequestResult GetModFileList2(const std::string &relativePath,const UiFileProperty &fileProperty);
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ import ResizeResponsiveComponent from './ResizeResponsiveComponent';
|
|||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { UiFileProperty,UiFileType } from './Lv2Plugin';
|
import { UiFileProperty,UiFileType } from './Lv2Plugin';
|
||||||
import SvgIcon from '@mui/material/SvgIcon';
|
import SvgIcon from '@mui/material/SvgIcon';
|
||||||
import ErrorIcon from '@mui/icons-material/Error';
|
//import ErrorIcon from '@mui/icons-material/Error';
|
||||||
|
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
|
||||||
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
|
import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';
|
||||||
@@ -291,7 +292,7 @@ export default class UploadFileDialog extends ResizeResponsiveComponent<UploadFi
|
|||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case FileUploadStatus.Error:
|
case FileUploadStatus.Error:
|
||||||
return (<ErrorIcon color="error" style={style} />);
|
return (<ErrorOutlineIcon color="error" style={style} />);
|
||||||
case FileUploadStatus.Uploaded:
|
case FileUploadStatus.Uploaded:
|
||||||
return (
|
return (
|
||||||
<CheckCircleOutlineIcon color="success" style={style}/>);
|
<CheckCircleOutlineIcon color="success" style={style}/>);
|
||||||
|
|||||||
Reference in New Issue
Block a user