Skip to content

Commit

Permalink
PDFBOX-5814: warning only for non empty files, as suggested by Anthon…
Browse files Browse the repository at this point in the history
…y Brunellière

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1917534 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed May 6, 2024
1 parent a819b8d commit 5033e86
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ public void save(OutputStream output) throws IOException
*/
public void save(File file, CompressParameters compressParameters) throws IOException
{
if (file.exists())
if (file.exists() && file.length() > 0)
{
LOG.warn(
"You are overwriting the existing file {}, this will produce a corrupted file if you're also reading from it",
Expand Down

0 comments on commit 5033e86

Please sign in to comment.