mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting)
GitOrigin-RevId: 6a4ecc355fb6644ce9b1970bdd0711f6d082c1b8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
28b9e8a2cd
commit
e882ed1e4f
@@ -60,9 +60,9 @@ public class SafeFileOutputStream extends OutputStream {
|
||||
Path parent = myTarget.getParent();
|
||||
Path backup = parent != null ? parent.resolve(myBackupName) : Paths.get(myBackupName);
|
||||
Files.copy(myTarget, backup, BACKUP_COPY);
|
||||
DosFileAttributeView dosView = SystemInfo.isWindows ? Files.getFileAttributeView(backup, DosFileAttributeView.class) : null;
|
||||
if (dosView != null && dosView.readAttributes().isReadOnly()) {
|
||||
dosView.setReadOnly(false);
|
||||
if (SystemInfo.isWindows) {
|
||||
DosFileAttributeView dosView = Files.getFileAttributeView(backup, DosFileAttributeView.class);
|
||||
if (dosView.readAttributes().isReadOnly()) dosView.setReadOnly(false);
|
||||
}
|
||||
return backup;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user