Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d17d8b9a authored by David A. Velasco's avatar David A. Velasco
Browse files

Moved target folder for download test to private storage, to fix problems with...

Moved target folder for download test to private storage, to fix problems with runtime check of permissions in Android 6
parent 8b91c71d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -227,8 +227,8 @@ public class TestActivity extends Activity {
	public RemoteOperationResult downloadFile(RemoteFile remoteFile, String temporalFolder) {
		// Create folder 
		String path =  "/owncloud/tmp/" + temporalFolder;
		File sdCard = Environment.getExternalStorageDirectory();
		File folder = new File(sdCard.getAbsolutePath() + "/" + path);
		File privateFolder = getFilesDir();
		File folder = new File(privateFolder.getAbsolutePath() + "/" + path);
		folder.mkdirs();
		
		DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(remoteFile.getRemotePath(), folder.getAbsolutePath());
+6 −9
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ public class DownloadFileTest extends RemoteTest {
	 */
	public void testDownloadFile() {
		RemoteOperationResult result = mActivity.downloadFile(
				new RemoteFile(mFullPath2Image), 
				mActivity.getFilesDir().getAbsolutePath()
			new RemoteFile(mFullPath2Image), ""
		);
		mDownloadedFilePath = mFullPath2Image;
		assertTrue(result.isSuccess());
@@ -107,8 +106,7 @@ public class DownloadFileTest extends RemoteTest {
	 */
	public void testDownloadFileSpecialChars() {
		RemoteOperationResult result = mActivity.downloadFile(
				new RemoteFile(mFullPath2ImageWitSpecialChars),
				mActivity.getFilesDir().getAbsolutePath()
			new RemoteFile(mFullPath2ImageWitSpecialChars), ""
		);
		mDownloadedFilePath = mFullPath2ImageWitSpecialChars;
		assertTrue(result.isSuccess());
@@ -120,8 +118,7 @@ public class DownloadFileTest extends RemoteTest {
	 */
	public void testDownloadFileNotFound() {
		RemoteOperationResult result = mActivity.downloadFile(
				new RemoteFile(mFullPath2ImageNotFound), 
				mActivity.getFilesDir().getAbsolutePath()
			new RemoteFile(mFullPath2ImageNotFound), ""
		);
		assertFalse(result.isSuccess());
	}