X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graphfile%2Fsrc%2Forg%2Fsimantics%2Fgraphfile%2Futil%2FGraphFileUtil.java;h=fbfcc3a146e9c39a63853cec2faf3c6d52eaa29b;hp=76003e023d778a1a73826152e715190400ac31ea;hb=e140d8f611f3ebcee3f36370aa0b50344d896953;hpb=505e21552623e5c9b12fefb2e3793a64d390a8fd 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 = "";