mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
fix: secure and refresh unrooted log exports
This commit is contained in:
1 parent
ca0689d254
commit
718712eb01
6 files changed
+78
-11
No files matched your search
@@ -27,6 +27,7 @@ import java.nio.file.SimpleFileVisitor
|
||||
import java.nio.file.attribute.BasicFileAttributes
|
||||
import java.security.MessageDigest
|
||||
import java.util.Locale
|
||||
import java.util.UUID
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
@@ -107,7 +108,7 @@ internal object EnhancedSessionLogShare {
|
||||
return emptyList()
|
||||
}
|
||||
val out = SessionLogShare.shareDir(context).apply { deleteRecursively(); mkdirs() }
|
||||
val stage = File(out, ".diagnostic-stage").apply { mkdirs() }
|
||||
val stage = File(context.cacheDir, "${out.name}-${UUID.randomUUID()}.diagnostic-stage").apply { mkdirs() }
|
||||
val redactionLearningComplete = LogRedactor.learnFromRuntime(LinuxRuntime.rootDir(context))
|
||||
val discovery = collect(context, folder, limits.maxDiscoveredFiles, legacy = false)
|
||||
val candidates = discovery.candidates
|
||||
@@ -173,7 +174,7 @@ internal object EnhancedSessionLogShare {
|
||||
out.deleteRecursively()
|
||||
return null
|
||||
}
|
||||
val stage = File(out, ".diagnostic-stage").apply { mkdirs() }
|
||||
val stage = File(context.cacheDir, "${out.name}-${UUID.randomUUID()}.diagnostic-stage").apply { mkdirs() }
|
||||
val records = ArrayList<Record>()
|
||||
val budget = Budget(limits.maxBytesTotal)
|
||||
val zip = File(out, "DroidDeck-${folder.name}.zip")
|
||||
|
||||
Reference in new issue
Block a user