mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
fix: check the result of deleting the relay-key temp file
This commit is contained in:
@@ -66,7 +66,7 @@ object RelayIdentity {
|
||||
val key = KeyPair()
|
||||
file.absoluteFile.parentFile?.mkdirs()
|
||||
val tmp = File(file.absoluteFile.parentFile, "${file.name}.tmp")
|
||||
tmp.delete()
|
||||
Files.deleteIfExists(tmp.toPath())
|
||||
try {
|
||||
Files.createFile(tmp.toPath(), PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rw-------")))
|
||||
} catch (_: UnsupportedOperationException) {
|
||||
|
||||
Reference in New Issue
Block a user