X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.graphfile%2Fsrc%2Forg%2Fsimantics%2Fgraphfile%2Futil%2FGraphFileUtil.java;h=fbfcc3a146e9c39a63853cec2faf3c6d52eaa29b;hb=aaa0aa90d9fdfc8350e36da4e0629c3f5916f68c;hp=76003e023d778a1a73826152e715190400ac31ea;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graphfile/src/org/simantics/graphfile/util/GraphFileUtil.java b/bundles/org.simantics.graphfile/src/org/simantics/graphfile/util/GraphFileUtil.java index 76003e023..fbfcc3a14 100644 --- a/bundles/org.simantics.graphfile/src/org/simantics/graphfile/util/GraphFileUtil.java +++ b/bundles/org.simantics.graphfile/src/org/simantics/graphfile/util/GraphFileUtil.java @@ -76,7 +76,9 @@ public class GraphFileUtil { public static File toTempFile(ReadGraph graph, Resource res)throws DatabaseException { GraphFileResource gf = GraphFileResource.getInstance(graph); - String filename = graph.getRelatedValue(res, gf.HasResourceName); + String filename = graph.getPossibleRelatedValue(res, gf.HasResourceName); + if (filename == null) + filename = graph.getRelatedValue(res, Layer0.getInstance(graph).HasName); int index = filename.lastIndexOf("."); String name = "";