-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(android): use specified Ti.Filesystem.File path to createFile() (#…
…11099) * fix(android): use specified Ti.Filesystem.File path to createFile() Fixes TIMOB-27193 * test(android): add test case for createFile()
- Loading branch information
1 parent
c697822
commit 37aace6
Showing
2 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2019-Present by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
/* eslint-env mocha */ | ||
/* eslint no-unused-expressions: "off" */ | ||
'use strict'; | ||
const should = require('./utilities/assertions'); | ||
|
||
describe('Ti.Filesystem', () => { | ||
it.android('TIMOB-27193', () => { | ||
const filename = `TIMOB-27193_${Date.now()}.txt`; | ||
const file = Ti.Filesystem.getFile(Ti.Filesystem.tempDirectory, filename); | ||
const originalPath = file.nativePath; | ||
file.createFile(); | ||
should(file.exists()).eql(true); | ||
// make sure we're not getting swindled by having the underlying file inside the proxy get changed on us! | ||
should(file.nativePath).eql(originalPath); | ||
}); | ||
}); |