ionic-cache-src icon indicating copy to clipboard operation
ionic-cache-src copied to clipboard

Problem with getCacheDir() method

Open srikanth235 opened this issue 9 years ago • 1 comments

Looks like there is problem with the method call getCacheDir() in cacheSrcStorage.It is returning undefined instead of data directory.

Also, a question not directly related though. Is it possible to make caching directory configurable. For e.g. in our case it makes more sense to us $window.cordova.file.externalDataDirectory instead of $window.cordova.file.dataDirectory as we want users to browse the content of images cache.

Root Cause: It looks like using var declaration on https://github.com/BenBBear/ionic-cache-src/blob/master/ionic-cache-src.js#L248 is making scope confine to only cacheSrc directive and hence preventing if from being used elsewhere (e.g. https://github.com/BenBBear/ionic-cache-src/blob/master/ionic-cache-src.js#L174).

srikanth235 avatar May 18 '16 13:05 srikanth235

Hello @srikanth235 , i had similar issue and i fixed it by removing "var" in this line https://github.com/BenBBear/ionic-cache-src/blob/master/ionic-cache-src.js#L248 i believe it's a mistake. i'll make pull request tomorrow.

DimaKoval avatar Aug 03 '16 13:08 DimaKoval