.. is a relative path. getAbsolutePath resolves relative paths. The reason
getCanonicalPath throws IOException and getAbsolutePath does not is because
getCanonicalPath resolves symlinks, which we don't want to do.
On Apr 21, 2014 11:29 AM, "Radu Mereuta" <notifications@github.com> wrote:

> In src/javasources/KTool/src/org/kframework/parser/DefinitionLoader.java:
>
> > @@ -102,7 +102,7 @@ public static Definition parseDefinition(File mainFile, String mainModule, boole
> >
> >              // transfer information from the BasicParser object, to the Definition object
> >              org.kframework.kil.Definition def = new org.kframework.kil.Definition();
> > -            def.setMainFile(mainFile.getCanonicalPath());
> > +            def.setMainFile(mainFile.getAbsolutePath());
>
> Why?
> I was asking for the CanonicalPath because I wanted the system to resolve
> the ".." from the filename. This is used many times in error reporting. The
> path to the files must be shown to the user in the most simple way.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/kframework/k/pull/395/files#r11813826>
> .
>