lhfongaa opened a new issue #376: File.dataDirectory returns incorrect data directory on my Ionic 4 app. URL: https://github.com/apache/cordova-plugin-file/issues/376 # Bug Report ## Problem ### What is expected to happen? When I use ```this.file.dataDirectory``` to get data directory, I should get correct correct directory location where stores app data files like ```file:///data/com.example.myapp/files/```. ### What does actually happen? However, it returns ```file:///data/user/0/com.example.myapp/files/``` which is a non-existed directory and occurs error code 1 NOT_FOUND_ERR when I check the directory. ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> ### Command or Code <!-- What command or code is needed to reproduce the problem? --> ``` someFunc() { console.log('this.file.dataDirectory = ' + this.file.dataDirectory); await this.file.createDir(this.file.dataDirectory, 'tempFolder', true); // Occurs NOT_FOUND_ERR } ``` ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Sony Xperia 1, Android 10 ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> ``` Ionic: Ionic CLI : 5.4.15 Ionic Framework : @ionic/angular 4.11.10 @angular-devkit/build-angular : 0.803.23 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0 Cordova: Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : android 8.1.0, browser 6.0.0, ios 5.1.1 ``` ``` com.unarin.cordova.beacon 3.8.1 "Proximity Beacon Plugin" cordova-plugin-advanced-http 2.4.0 "Advanced HTTP plugin" cordova-plugin-app-version 0.1.9 "AppVersion" cordova-plugin-autostart 2.3.0 "Autostart" cordova-plugin-background-mode 0.7.3 "BackgroundMode" cordova-plugin-badge 0.8.8 "Badge" cordova-plugin-ble-central 1.2.4 "BLE" cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab" cordova-plugin-camera 4.1.0 "Camera" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-device 2.0.3 "Device" cordova-plugin-file 6.0.2 "File" cordova-plugin-file-transfer 1.7.1 "File Transfer" cordova-plugin-geolocation 4.0.2 "Geolocation" cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps" cordova-plugin-inappbrowser 3.2.0 "InAppBrowser" cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview" cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification" cordova-plugin-nativestorage 2.3.2 "NativeStorage" cordova-plugin-secure-storage 3.0.2 "SecureStorage" cordova-plugin-splashscreen 5.0.3 "Splashscreen" cordova-plugin-statusbar 2.4.3 "StatusBar" cordova-plugin-telerik-imagepicker 2.3.3 "ImagePicker" cordova-plugin-whitelist 1.3.4 "Whitelist" cordova-support-google-services 1.3.2 "cordova-support-google-services" cordova.plugins.diagnostic 5.0.1 "Diagnostic" phonegap-plugin-multidex 1.0.0 "Multidex" ``` ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] I included all the necessary information above
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
