Skip to content

Commit

Permalink
Closes issue zxing#539 : handle relative files again
Browse files Browse the repository at this point in the history
  • Loading branch information
srowen committed Jan 14, 2016
1 parent 4e3abaf commit 3912f3f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.beust.jcommander.JCommander;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -90,7 +89,7 @@ public static void main(String[] args) throws Exception {
}
}

private static List<URI> expand(List<URI> inputs) throws IOException, URISyntaxException {
private static List<URI> expand(List<URI> inputs) throws IOException {
List<URI> expanded = new ArrayList<>();
for (URI input : inputs) {
if (isFileOrDir(input)) {
Expand All @@ -111,7 +110,7 @@ private static List<URI> expand(List<URI> inputs) throws IOException, URISyntaxE
for (int i = 0; i < expanded.size(); i++) {
URI input = expanded.get(i);
if (input.getScheme() == null) {
expanded.set(i, new URI("file", input.getSchemeSpecificPart(), input.getFragment()));
expanded.set(i, Paths.get(input.getRawPath()).toUri());
}
}
return expanded;
Expand Down

0 comments on commit 3912f3f

Please sign in to comment.