Changeset 14091 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2018-08-05T20:11:27+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/WindowsShortcut.java
r13698 r14091 44 44 */ 45 45 public static boolean isPotentialValidLink(File file) throws IOException { 46 final int minimum _length = 0x64;46 final int minimumLength = 0x64; 47 47 boolean isPotentiallyValid = false; 48 48 try (InputStream fis = Files.newInputStream(file.toPath())) { 49 49 isPotentiallyValid = file.isFile() 50 50 && file.getName().toLowerCase(Locale.ENGLISH).endsWith(".lnk") 51 && fis.available() >= minimum _length51 && fis.available() >= minimumLength 52 52 && isMagicPresent(getBytes(fis, 32)); 53 53 } … … 126 126 private static boolean isMagicPresent(byte[] link) { 127 127 final int magic = 0x0000004C; 128 final int magic _offset = 0x00;129 return link.length >= 32 && bytesToDword(link, magic _offset) == magic;128 final int magicOffset = 0x00; 129 return link.length >= 32 && bytesToDword(link, magicOffset) == magic; 130 130 } 131 131
Note:
See TracChangeset
for help on using the changeset viewer.