#4098: Written data violates configuration write directory environment
-------------------+-------------------------------------
Reporter: vexed | Owner:
Type: bug | Status: new
Priority: major | Milestone: unspecified
Component: other | Version: git/master
Keywords: | Blocked By:
Blocking: | Operating System: All/Non-Specific
-------------------+-------------------------------------
\
\
5f32c3eafe26c959045f10b21bea2efc69c770d2
We should be calling PHYSFS_getWriteDir() to know where to write to.
There may be more of these... I just happen to find this while looking at
ticket:4096
{{{
From b858dffa08819b7659627e3c252812f18e777a7d Mon Sep 17 00:00:00 2001
From: vexed <[email protected]>
Date: Sun, 27 Oct 2013 22:56:13 -0400
Subject: [PATCH] Fix writing out file to make sure it is using our write
directory.
---
lib/ivis_opengl/screen.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ivis_opengl/screen.cpp b/lib/ivis_opengl/screen.cpp
index 0558905..c27552e 100644
--- a/lib/ivis_opengl/screen.cpp
+++ b/lib/ivis_opengl/screen.cpp
@@ -229,8 +229,10 @@ void wzPerfShutdown()
{
return;
}
+ QString ourfile = PHYSFS_getWriteDir();
+ ourfile.append("gfx-performance.csv");
// write performance counter list to file
- QFile perf("gfx-performance.csv");
+ QFile perf(ourfile);
perf.open(QIODevice::WriteOnly);
perf.write("START, EFF, TERRAIN, LOAD, PRTCL, WATER, MODELS,
MISC\n");
for (int i = 0; i < perfList.size(); i++)
--
1.8.4.msysgit.0
}}}
\
\
\
--
Ticket URL: <http://developer.wz2100.net/ticket/4098>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project