Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9105c575 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Allow the imported user profile to be overwritten

Indeed, we faced a FileAlreadyExistsException before.
parent 8c25b3f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ object ProfileManager {
        val profileName = getProfileName { FileXmlResourceParser(file) } ?: return false
        try {
            Log.d(TAG, "Importing user profile '$profileName'")
            file.copyTo(getUserProfileFile(context))
            file.copyTo(getUserProfileFile(context), overwrite = true)
            if (activeProfile == PROFILE_USER) applyProfile(context, PROFILE_USER)
            return true
        } catch (e: Exception) {