Skip to content

Commit 9321e51

Browse files
authored
Code style cleanup
1 parent 98485dc commit 9321e51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/java/com/turn/ttorrent/common/Torrent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ public Torrent(byte[] torrent, boolean seeder) throws IOException, NoSuchAlgorit
219219
for (BEValue file : this.decoded_info.get("files").getList()) {
220220
Map<String, BEValue> fileInfo = file.getMap();
221221
StringBuilder path = new StringBuilder();
222+
// Try UTF-8 path first, but fallback to regular path
222223
BEValue beValue = fileInfo.get("path.utf-8");
223-
if(null == beValue){
224+
if (beValue == null) {
224225
beValue = fileInfo.get("path");
225226
}
226227
for (BEValue pathElement : beValue.getList()) {

0 commit comments

Comments
 (0)