mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix of bug in FileUtil - do not empty the file if one tries to copy it into itself.
This commit is contained in:
@@ -459,6 +459,7 @@ public class FileUtil extends FileUtilRt {
|
||||
|
||||
@SuppressWarnings("Duplicates")
|
||||
private static void performCopy(@NotNull File fromFile, @NotNull File toFile, final boolean syncTimestamp) throws IOException {
|
||||
if (filesEqual(fromFile, toFile)) return;
|
||||
final FileOutputStream fos;
|
||||
try {
|
||||
fos = openOutputStream(toFile);
|
||||
|
||||
Reference in New Issue
Block a user