mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
URL fix for plugin as well. Oh, let's force logfile 3 to be in a temp dir, because letting the user specify it would be a security leak.
This commit is contained in:
parent
641449a813
commit
8585dd6cb3
@ -54,7 +54,16 @@ P3DSession(P3DInstance *inst) {
|
||||
_started_read_thread = false;
|
||||
_read_thread_continue = false;
|
||||
|
||||
_output_filename = inst->get_fparams().lookup_token("output_filename");
|
||||
#ifdef _WIN32
|
||||
static const size_t buffer_size = 4096;
|
||||
char buffer[buffer_size];
|
||||
if (GetTempPath(buffer_size, buffer) != 0) {
|
||||
_output_filename = buffer;
|
||||
_output_filename += "panda3d.3.log";
|
||||
}
|
||||
#else
|
||||
_output_filename = "/tmp/panda3d.3.log";
|
||||
#endif // _WIN32
|
||||
|
||||
_panda3d_callback = NULL;
|
||||
|
||||
|
@ -105,6 +105,9 @@ begin() {
|
||||
if (!is_plugin_loaded()) {
|
||||
// Go download the contents file, so we can download the core DLL.
|
||||
string url = P3D_PLUGIN_DOWNLOAD;
|
||||
if (!url.empty() && url[url.length() - 1] != '/') {
|
||||
url += '/';
|
||||
}
|
||||
url += "contents.xml";
|
||||
PPDownloadRequest *req = new PPDownloadRequest(PPDownloadRequest::RT_contents_file);
|
||||
start_download(url, req);
|
||||
@ -827,6 +830,9 @@ get_core_api(TiXmlElement *xpackage) {
|
||||
} else {
|
||||
// The DLL file needs to be downloaded. Go get it.
|
||||
string url = P3D_PLUGIN_DOWNLOAD;
|
||||
if (!url.empty() && url[url.length() - 1] != '/') {
|
||||
url += '/';
|
||||
}
|
||||
url += _core_api_dll.get_filename();
|
||||
|
||||
PPDownloadRequest *req = new PPDownloadRequest(PPDownloadRequest::RT_core_dll);
|
||||
|
Loading…
x
Reference in New Issue
Block a user