mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 12:59:07 -06:00
No longer add .txt extension to all UrlSynchronizations
This commit is contained in:
Submodule ext/ghoul updated: 42c4d7e985...611f96b403
@@ -46,7 +46,6 @@ namespace {
|
||||
constexpr const char* KeyFilename = "Filename";
|
||||
|
||||
constexpr const char* TempSuffix = ".tmp";
|
||||
constexpr const char* FileSuffix = ".txt";
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
@@ -128,10 +127,6 @@ UrlSynchronization::UrlSynchronization(const ghoul::Dictionary& dict,
|
||||
|
||||
if (dict.hasValue<std::string>(KeyFilename)) {
|
||||
_filename = dict.value<std::string>(KeyFilename);
|
||||
std::size_t foundExt = _filename.find(FileSuffix);
|
||||
if (foundExt == std::string::npos) {
|
||||
_filename += FileSuffix;
|
||||
}
|
||||
}
|
||||
|
||||
bool useHash = true;
|
||||
@@ -204,12 +199,10 @@ void UrlSynchronization::start() {
|
||||
std::string lastPartOfUrl = url.substr(lastSlash + 1);
|
||||
|
||||
// We can not create filenames with questionmarks
|
||||
lastPartOfUrl.erase(std::remove(lastPartOfUrl.begin(), lastPartOfUrl.end(), '?'), lastPartOfUrl.end());
|
||||
|
||||
std::size_t foundExt = lastPartOfUrl.find(FileSuffix);
|
||||
if (foundExt == std::string::npos) {
|
||||
lastPartOfUrl += FileSuffix;
|
||||
}
|
||||
lastPartOfUrl.erase(
|
||||
std::remove(lastPartOfUrl.begin(), lastPartOfUrl.end(), '?'),
|
||||
lastPartOfUrl.end()
|
||||
);
|
||||
_filename = lastPartOfUrl;
|
||||
}
|
||||
std::string fileDestination = directory() +
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <ghoul/misc/easing.h>
|
||||
#include <regex>
|
||||
|
||||
#pragma optimize ("", off)
|
||||
namespace openspace {
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user