{ "id": "171828", "key": "TIMOB-26149", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-24T01:29:51.000+0000", "created": "2018-06-22T15:13:52.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "parity" ], "versions": [ { "id": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2018-08-24T01:29:54.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "According to our docs, and our iOS behavior - if Ti.FIlesystem.File#getDirectoryListing() is called on a file or a directory that does not exist, it should return null. On Android it returns an empty array.", "attachment": [], "flagged": false, "summary": "Android: Ti.Filesystem.File#getDirectoryListing() does not return null for file/non-existent directory", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 1045, "state": "closed", "name": "2018 Sprint 13 SDK", "startDate": "2018-06-17T20:47:13.621Z", "endDate": "2018-07-01T20:47:00.000Z", "completeDate": "2018-07-02T18:40:05.029Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "438635", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/10128", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-06-22T15:19:59.000+0000", "updated": "2018-06-22T15:19:59.000+0000" }, { "id": "440745", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix in SDK version: {{7.4.0.v20180810061237}}. {{getDirectoryListing}} no longer returns an empty array and now returns {{null}}.\r\n\r\n*FR Passed (Test Steps):*\r\n# Created a new application using Titanium\r\n# Added the following code in to the application \r\n{code:java}\r\nvar nonExistentDir = Ti.Filesystem.getFile('madeup');\r\nTi.API.info(nonExistentDir.getDirectoryListing()); // Should print 'null'\r\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'app.js');\r\nTi.API.info(file.getDirectoryListing()); // Should print 'null'\r\n{code}\r\n# Ran the application\r\n# Able to see {{null}} printed in the console unlike previously where an empty array was printed.\r\n{code:java}\r\n[INFO] : null\r\n[INFO] : null\r\n{code}\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.1.0.201808080937\r\nAPPC CLI: 7.0.4\r\nPixel XL (8.1)\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13\r\nNode.js Version: 8.9.1\r\nXcode 9.2\r\n{code}", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-14T11:12:22.000+0000", "updated": "2018-08-14T11:12:22.000+0000" }, { "id": "440750", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Edit* SDK Version: {{7.4.0.v20180813131247}} was used. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-14T13:35:03.000+0000", "updated": "2018-08-14T13:35:03.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }