Skip to content

Commit

Permalink
[#906] - Files created in tmp/ not being deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
pepite committed Dec 30, 2012
1 parent 509b4b6 commit 4601b0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions framework/src/play/server/StreamChunkAggregator.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Ex
currentMessage.setContent(new FileChannelBuffer(localFile));
this.out = null;
this.currentMessage = null;
this.file.delete();
this.file = null;
Channels.fireMessageReceived(ctx, currentMessage, e.getRemoteAddress());
}
Expand Down

1 comment on commit 4601b0d

@minimarcel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just test on Linux, Mac and Windows, and this fix works fine on Linux and Mac but doesn't on Windows.
The delete method returns false because the file is opened. I guess that only unix based systems are able to keep a file opened after removing.

Please sign in to comment.