Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.io.Reader;
import java.io.Writer;
import java.nio.charset.Charset;
import java.nio.charset.MalformedInputException;
import java.nio.file.FileSystemException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
Expand Down Expand Up @@ -388,6 +389,8 @@ private static boolean copyUnconditionally(File from, File to, String encoding,
writer.write(buffer, 0, nRead);
}
}
} catch (MalformedInputException e) {
throw new IOException("using encoding " + charset.name(), e);
}
}
copyFilePermissions(from, to);
Expand Down Expand Up @@ -418,6 +421,8 @@ private static boolean copyIfContentsChanged(File from, File to, String encoding
}
copied = writer.isModified();
}
} catch (MalformedInputException e) {
throw new IOException("using encoding " + charset.name(), e);
}
}
copyFilePermissions(from, to);
Expand Down