Fix clean-up code in Android autotest script

If the files directory is not world-readable as well as
writable, the "rm *" command will fail because it cannot list
the files to delete.

Task-number: QTBUG-32079
Change-Id: Idb32a2be3184b9ffc43d011136fcc6f2a2a01756
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2013-07-29 15:49:21 +02:00 committed by The Qt Project
parent c52bec9438
commit 3b12fa2c04

View File

@ -62,9 +62,9 @@ public class QtActivity extends Activity {
QtNative.loadQtLibraries(libs);
// start application
final String envPaths = "NECESSITAS_API_LEVEL=2\tHOME=" + getDir("files", MODE_WORLD_WRITEABLE).getAbsolutePath() +
"\tTMPDIR=" + getDir("files", MODE_WORLD_WRITEABLE).getAbsolutePath() +
"\tCACHE_PATH=" + getDir("files", MODE_WORLD_WRITEABLE).getAbsolutePath();
final String envPaths = "NECESSITAS_API_LEVEL=2\tHOME=" + getDir("files", MODE_WORLD_WRITEABLE | MODE_WORLD_READABLE).getAbsolutePath() +
"\tTMPDIR=" + getDir("files", MODE_WORLD_WRITEABLE | MODE_WORLD_READABLE).getAbsolutePath() +
"\tCACHE_PATH=" + getDir("files", MODE_WORLD_WRITEABLE | MODE_WORLD_READABLE).getAbsolutePath();
if (environment != null && environment.length() > 0)
environment = envPaths + "\t" + environment;
else
@ -138,7 +138,7 @@ public class QtActivity extends Activity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
getDir("files", MODE_WORLD_WRITEABLE);
getDir("files", MODE_WORLD_WRITEABLE | MODE_WORLD_READABLE);
requestWindowFeature(Window.FEATURE_NO_TITLE);
m_quitApp = true;
QtNative.setMainActivity(this);