This commit is contained in:
2021-12-08 19:04:21 +00:00
parent 78a85d08bb
commit 6af640380b
3 changed files with 26 additions and 17 deletions

18
.vscode/launch.json vendored
View File

@@ -41,23 +41,23 @@
// "ASPNETCORE_ENVIRONMENT": "Development",
// "AYANOVA_JWT_SECRET": "UNLICENSED5G*QQJ8#bQ7$Xr_@sXfHq4",
// //"AYANOVA_SET_SUPERUSER_PW": "l3tm3in",
// "AYANOVA_LOG_LEVEL": "Info",
"AYANOVA_LOG_LEVEL": "Info",
// //"AYANOVA_LOG_LEVEL": "Debug",
// // "AYANOVA_LOG_LEVEL": "Trace",
// "AYANOVA_DEFAULT_TRANSLATION": "en",
"AYANOVA_DEFAULT_TRANSLATION": "en",
// //"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true",
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;CommandTimeout=120;",
//"AYANOVA_DATA_PATH": "c:\\temp\\ravendata",
"AYANOVA_DATA_PATH": "c:\\temp\\ravendata",
// //"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=abraxis;Database=AyaNova;CommandTimeout=120;",
// "AYANOVA_USE_URLS": "http://*:7575;",
"AYANOVA_USE_URLS": "http://*:7575;",
// //"AYANOVA_REPORT_RENDERING_TIMEOUT": "20000",
// //"AYANOVA_REPORT_RENDERING_MAX_INSTANCES": "3",
"AYANOVA_ATTACHMENT_FILES_PATH": "c:\\temp\\RavenTestData\\userfiles",
// "AYANOVA_ATTACHMENT_FILES_PATH": "c:\\temp\\RavenTestData\\userfiles",
// "AYANOVA_ATTACHMENT_FILES_PATH":"%ProgramData%\\ayanova\\userfiles",
"AYANOVA_BACKUP_FILES_PATH": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_TEMP_FILES_PATH": "c:\\temp\\RavenTestData\\tempfiles",
"AYANOVA_SERVER_TEST_MODE": "false",
"AYANOVA_LOG_PATH": "c:\\temp\\RavenTestData\\logs",
//"AYANOVA_BACKUP_FILES_PATH": "c:\\temp\\RavenTestData\\backupfiles",
//"AYANOVA_TEMP_FILES_PATH": "c:\\temp\\RavenTestData\\tempfiles",
//"AYANOVA_SERVER_TEST_MODE": "false",
//"AYANOVA_LOG_PATH": "c:\\temp\\RavenTestData\\logs",
// "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
// "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",

View File

@@ -8,14 +8,15 @@ SPLIT THIS OUT INTO MULTIPLE PAGES LIKE WINDOWS
//#################################### LINUX DESKTOP ################################
todo: error rendering needs fix:
1638924788467|API error: status=400, statusText=Bad Request, url=http://localhost:7575/api/v8.0/report/render
1638924788636|Vue error:
2030 - Invalid operation
Failed to launch browser! [1207/165308.271638:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
It needs this command line lo.Args = new string[] { $"--disable-dev-shm-usage --no-sandbox --disable-gpu --no-zygote " };
I think the best thing to do is make it yet another server config because it's super likely that it will need to be tweaked in future, best to make it just settable and default it to above
{"error":{"code":"2030","message":"Access to the path '/usr/bin/ayanova/~/.ayanova-data/temp/u5xaufhyksh.pdf' is denied."}}
config.json is:
{
"AYANOVA_USE_URLS": "http://*:7575",
"AYANOVA_DB_CONNECTION":"Server=localhost;Username=postgres;Password=letmein;Database=AyaNova;",
"AYANOVA_DEFAULT_TRANSLATION":"en",
"AYANOVA_DATA_PATH":"~/.ayanova-data",
"AYANOVA_LOG_LEVEL": "Info"
}

View File

@@ -812,6 +812,14 @@ namespace AyaNova.Util
return string.Empty;
}
//only applies if there is a % in it
//"A string containing the names of zero or more environment variables. Each environment variable is quoted with the percent sign character (%)."
if(!path.Contains('%')){
return path;
}
return System.Environment.ExpandEnvironmentVariables(path);
}