diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset index 9f18fb85f7..5c642c90df 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -7,6 +7,7 @@ local url = "https://celestrak.com/satcat/tle.php?CATNR=25544" local identifier = "ISS" local filename = "ISS.txt" local nodes = {} +local tle = satelliteHelper.downloadTLEFile(asset, url, identifier, filename) local modelsLocation = asset.syncedResource({ Name = "ISS Models", @@ -16,8 +17,6 @@ local modelsLocation = asset.syncedResource({ }) -local tle = satelliteHelper.downloadTLEFile(asset, url, identifier, filename) - local initializeAndAddNodes = function() local lineElement = satelliteHelper.makeSingleLineElement(tle, filename) diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index 75d52cee1b..da77b3a80a 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -203,6 +203,7 @@ void UrlSynchronization::start() { const size_t lastSlash = url.find_last_of('/'); 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(ext);