Don't Create Directories when default Dir is null

This commit is contained in:
shabinder 2021-09-26 13:59:25 +05:30
parent 7bc3a24a50
commit 7ff8b918ff
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ interface FileManager {
* */ * */
fun FileManager.createDirectories() { fun FileManager.createDirectories() {
try { try {
if (defaultDir() != "null") { if (!defaultDir().contains("null${fileSeparator()}SpotiFlyer")) {
createDirectory(defaultDir()) createDirectory(defaultDir())
createDirectory(imageCacheDir()) createDirectory(imageCacheDir())
createDirectory(defaultDir() + "Tracks/") createDirectory(defaultDir() + "Tracks/")

View File

@ -25,7 +25,7 @@ internal class DesktopAnalyticsManager(
loggingLevel = LoggingLevel.ERROR loggingLevel = LoggingLevel.ERROR
setDeviceIdStrategy(DeviceIdStrategy.UUID) setDeviceIdStrategy(DeviceIdStrategy.UUID)
enableFeatures(*featuresSet) enableFeatures(*featuresSet)
setRequiresConsent(false) setRequiresConsent(true)
} }
Countly.init(File(fileManager.defaultDir()), config) Countly.init(File(fileManager.defaultDir()), config)