mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
Feature/serve screenshots (#1003)
* Take screnshots using lua function, returning screenshot number. Add screenshot endpoint. * Change capitalization from screenShot to screenshot * Fix screenshot filename collision bug when using multiple windows.
This commit is contained in:
@@ -246,16 +246,15 @@ void WebGuiModule::startProcess() {
|
||||
std::string formattedDirectories = "[";
|
||||
|
||||
std::vector<std::string> directories = _directories.value();
|
||||
bool first = true;
|
||||
|
||||
for (const std::string& str : directories) {
|
||||
if (!first) {
|
||||
for (size_t i = 0; i < directories.size(); ++i) {
|
||||
std::string arg = directories[i];
|
||||
if (i & 1) {
|
||||
arg = absPath(arg);
|
||||
}
|
||||
formattedDirectories += "\\\"" + escapedJson(escapedJson(arg)) + "\\\"";
|
||||
if (i != directories.size() - 1) {
|
||||
formattedDirectories += ",";
|
||||
}
|
||||
first = false;
|
||||
|
||||
// Escape twice: First json, and then bash (which needs same escape sequences)
|
||||
formattedDirectories += "\\\"" + escapedJson(escapedJson(str)) + "\\\"";
|
||||
}
|
||||
formattedDirectories += "]";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user