exception dumping doesn't respect any of TMP/TMPDIR/TEMP/TEMPDIR #3885
Comments
Cyp changed blocking which not transferred by tractive |
Cyp changed blockedby which not transferred by tractive |
Cyp commented If removing the "/tmp/" and running "src/warzone2100 --crash", the dump appears in the working directory. |
pabs commented Hmmm, I thought mkstemp would be smarter than that. The options appear to be: Switch to ~/.warzone2100-$v/crash-dumps. This has the advantage that next time the game starts you can automatically ask the user if they want to submit the crash dumps they have. chdir to TMP, TMPDIR, TEMP, TEMPDIR or /tmp before mkstemp. Use tempnam with a loop and exclusive locks to prevent security issues. |
Per commented Use QDir::tempPath()? See http://qt-project.org/doc/qt-4.8/qdir.html#tempPath |
pabs commented QDir::tempPath() sounds like a good choice in the interim. I would still suggest to switch to a dedicated directory since it has a number of advantages, but thats a topic for another ticket I guess. |
clueless commented With 3.1.1, the crash file for windows machines are in the configuration directory called logs and on Ubuntu they are still in /tmp/ |
vexed changed status from |
vexed changed owner from `` to |
vexed changed resolution from `` to |
vexed commented In Warzone2100/warzone2100@ff1ac37:
|
resolution_fixed
type_bug
| by pabsThe exception handler hard-codes /tmp/ instead of using the TMP/TMPDIR/TEMP/TEMPDIR environment variables. mkstemp already respects these variables so all that is needed is to drop the
/tmp/
from this string. Personally I think ~/.warzone-3.1/crash-dumps/XXXXXX is a better place for these files.Issue migrated from trac:3885 at 2022-04-16 10:48:50 -0700
The text was updated successfully, but these errors were encountered: