Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26159] Windows: File.getDirectoryListing() returns empty array for file or non-existent directory.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-09-18T13:55:34.000+0000
Affected Version/sRelease 7.3.0
Fix Version/sRelease 8.0.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2018-06-27T01:09:52.000+0000
Updated2018-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.

Comments

  1. Kota Iguchi 2018-06-28

    https://github.com/appcelerator/titanium_mobile_windows/pull/1264
  2. Samir Mohammed 2018-09-18

    FR Passed waiting on Master build from Jenkins.
  3. Samir Mohammed 2018-12-11

    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

JSON Source