mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Replace File.delete with Files.delete
This commit is contained in:
parent
4e69b34efe
commit
fc5af35a04
1 changed files with 6 additions and 1 deletions
|
@ -30,6 +30,7 @@ import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -122,7 +123,11 @@ public class GroupStore {
|
||||||
}
|
}
|
||||||
final var groupFileLegacy = getGroupV2FileLegacy(group.getGroupId());
|
final var groupFileLegacy = getGroupV2FileLegacy(group.getGroupId());
|
||||||
if (groupFileLegacy.exists()) {
|
if (groupFileLegacy.exists()) {
|
||||||
groupFileLegacy.delete();
|
try {
|
||||||
|
Files.delete(groupFileLegacy.toPath());
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error("Failed to delete legacy group file {}: {}", groupFileLegacy, e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Failed to cache group, ignoring: {}", e.getMessage());
|
logger.warn("Failed to cache group, ignoring: {}", e.getMessage());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue