[TIMOB-26159] Windows: File.getDirectoryListing() returns empty array for file or non-existent directory.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-09-18T13:55:34.000+0000 |
Affected Version/s | Release 7.3.0 |
Fix Version/s | Release 8.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Kota Iguchi |
Assignee | Kota Iguchi |
Created | 2018-06-27T01:09:52.000+0000 |
Updated | 2018-12-11T12:12:57.000+0000 |
Description
Windows:
File.getDirectoryListing()
returns empty array for file or non-existent directory.
// FIXME Windows returns empty array
it.windowsBroken('returns null for non-existent directory', function () {
var nonExistentDir = Ti.Filesystem.getFile('madeup');
var result = nonExistentDir.getDirectoryListing();
should(nonExistentDir).be.ok;
should(nonExistentDir.exists()).eql(false);
should(result).eql(null);
});
// FIXME Windows returns empty array
it.windowsBroken('returns null for file', function () {
var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'app.js');
var result = file.getDirectoryListing();
should(file).be.ok;
should(file.exists()).eql(true);
should(file.isFile()).eql(true);
should(result).eql(null);
});
Expected: null
should be returned for file or non-existent directory.
https://github.com/appcelerator/titanium_mobile_windows/pull/1264
FR Passed waiting on Master build from Jenkins.
Closing ticket, fix verified in SDK version 8.0.0.v20181210172243. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1264