Skip to content

Commit

Permalink
Use ResolverUtil to resolve remote knime:// paths
Browse files Browse the repository at this point in the history
  • Loading branch information
gab1one committed Sep 11, 2017
1 parent 12d9b48 commit a75c9da
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import org.knime.core.data.StringValue;
import org.knime.core.data.def.DefaultRow;
import org.knime.core.node.ExecutionContext;
import org.knime.core.util.FileUtil;
import org.knime.core.util.Pair;
import org.knime.core.util.pathresolve.ResolverUtil;
import org.knime.knip.base.node.nodesettings.SettingsModelSubsetSelection2;
import org.knime.knip.io.nodes.imgreader2.AbstractReadImgFunction;
import org.knime.knip.io.nodes.imgreader2.ColumnCreationMode;
Expand Down Expand Up @@ -76,7 +76,7 @@ public Stream<Pair<DataRow, Optional<Throwable>>> apply(DataRow input) {
|| url.getProtocol().equalsIgnoreCase("HTTPS")) {
path = url.toURI().toString();
} else {
path = FileUtil.resolveToPath(url).toString();
path = ResolverUtil.resolveURItoLocalOrTempFile(url.toURI()).getAbsolutePath();
}

numSeries = m_imgSource.getSeriesCount(path);
Expand Down

0 comments on commit a75c9da

Please sign in to comment.