Skip to content

Commit

Permalink
Code style cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetazzoni authored Jul 1, 2017
1 parent 98485dc commit 9321e51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/com/turn/ttorrent/common/Torrent.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ public Torrent(byte[] torrent, boolean seeder) throws IOException, NoSuchAlgorit
for (BEValue file : this.decoded_info.get("files").getList()) {
Map<String, BEValue> fileInfo = file.getMap();
StringBuilder path = new StringBuilder();
// Try UTF-8 path first, but fallback to regular path
BEValue beValue = fileInfo.get("path.utf-8");
if(null == beValue){
if (beValue == null) {
beValue = fileInfo.get("path");
}
for (BEValue pathElement : beValue.getList()) {
Expand Down

0 comments on commit 9321e51

Please sign in to comment.