{ "id": "175617", "key": "TIMOB-28176", "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": "21052", "description": "", "name": "Release 9.3.0", "archived": false, "released": true, "releaseDate": "2020-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-11-20T14:37:31.000+0000", "created": "2020-10-07T19:38:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "directory", "filesystem", "parity" ], "versions": [], "issuelinks": [ { "id": "58797", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175384", "key": "TIMOB-28058", "fields": { "summary": "Android: Change Ti.Filesystem \"temp\" APIs to use app's cache folder", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-11-20T14:37:31.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": "*Summary:*\r\nThe [Ti.Filesystem.createTempDirectory()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem-method-createTempDirectory] method does not create the referenced directory by default on Android. It correctly returns a {{Ti.Filesystem.File}} object referencing a new directory, but the Titanium developer is forced to create it manually afterwards, which doesn't match iOS' behavior or what's implied by the method name.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below on Android.\r\n# Notice in the log that \"exists\" returns {{false}}. _(This is the bug.)_\r\n\r\n{code:javascript}\r\nvar tempDir = Ti.Filesystem.createTempDirectory();\r\nconsole.log(\"@@@ nativePath: \" + tempDir.nativePath);\r\nconsole.log(\"@@@ exists: \" + tempDir.exists());\r\n{code}\r\n\r\n*Note:*\r\nAndroid should also be changed to create the temp directory under the {{Ti.Filesystem.tempDirectory}} like iOS. Currently, Android puts the temp directory in a radically different location that Titanium does not offer a directory constant for.\r\n\r\n*Work-Around:*\r\nYou must create the directory manually like the below.\r\n{code:java}\r\nvar tempDir = Ti.Filesystem.createTempDirectory();\r\nif (OS_ANDROID) {\r\n\ttempDir.createDirectory();\r\n}\r\nconsole.log(\"@@@ exists: \" + tempDir.exists());\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: createTempDirectory() does not create a directory", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1208, "state": "closed", "name": "2020 Sprint 21", "startDate": "2020-10-12T16:34:00.000Z", "endDate": "2020-10-23T16:34:00.000Z", "completeDate": "2020-10-23T02:32:43.674Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "457191", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12161", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-07T19:51:29.000+0000", "updated": "2020-10-07T19:51:29.000+0000" }, { "id": "457283", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for Jenkins build.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-19T20:14:05.000+0000", "updated": "2020-10-19T20:14:05.000+0000" }, { "id": "457286", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master for 9.3.0 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-10-19T21:30:59.000+0000", "updated": "2020-10-19T21:30:59.000+0000" }, { "id": "457654", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.3.0.v20201119063936}}.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/12161\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-11-20T14:37:19.000+0000", "updated": "2020-11-20T14:37:19.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }