{ "id": "170595", "key": "TIMOB-25602", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-01-22T03:35:07.000+0000", "created": "2017-12-11T21:31:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-05-09T06:48:00.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "Steps to generate this problem:\r\n\r\nIssue 1:\r\nFolder exists in real physical path but it always shows as false.\r\n\r\nvar cDir;\r\n\r\nif(Ti.Filesystem.isExternalStoragePresent())\r\n{\r\n cDir = Ti.Filesystem.externalStorageDirectory + \"/Attachments\";\r\n}\r\nelse\r\n{\r\n cDir = Ti.Filesystem.applicationDataDirectory + \"/Attachments\";\r\n \r\n}\r\n\r\nvar folder = Titanium.Filesystem.getFile(cDir);\r\nif(!folder.exists()) //folder doesn't exists\r\n{\r\n folder.createDirectory(); //create folder. OK\r\n}\r\n//after creating folder, try to check if folder exists statement anywhere in code.\r\n//it always shows as false even if folder is present.\r\n\r\nTi.API.info(\"folder exists:\" + folder.exists());\r\n\r\n\r\nIssue 2:\r\nCreating subfolder always makes application crash. Code:\r\n\r\nvar cDirTemp;\r\ncDirTemp = cDir + \"/Temp\";\r\nvar folderTemp = Titanium.Filesystem.getFile(cDirTemp);\r\n\r\nif(!folderTemp.exists()) \r\n{\r\n folderTemp.createDirectory(); //this line makes application crash.\r\n}\r\nelse{\r\n folderTemp.deleteDirectory(true);\r\n folderTemp.createDirectory();\r\n}\r\n\r\nTesting code is attached for detail.", "attachment": [ { "id": "63774", "filename": "test.js", "author": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-11T21:29:19.000+0000", "size": 834, "mimeType": "application/javascript" } ], "flagged": false, "summary": "Windows: Titanium.Filesystem ( Folder exists in real physical path but it always shows as false).", "creator": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Surface Pro\r\nSDK 7.0.0 GA", "closedSprints": [ { "id": 985, "state": "closed", "name": "2018 Sprint 01 SDK", "startDate": "2017-12-31T16:58:54.631Z", "endDate": "2018-01-14T16:58:00.000Z", "completeDate": "2018-01-17T22:44:27.028Z", "originBoardId": 114 }, { "id": 990, "state": "closed", "name": "2018 Sprint 02 SDK", "startDate": "2018-01-14T22:48:43.544Z", "endDate": "2018-01-28T22:48:00.000Z", "completeDate": "2018-01-29T16:22:42.911Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "433235", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1172", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-01-17T05:58:09.000+0000", "updated": "2018-01-17T05:58:09.000+0000" }, { "id": "433442", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Merged.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-01-22T03:35:07.000+0000", "updated": "2018-01-22T03:35:07.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }