[572233] Add existence check for type lib folder

With this existence check on the type lib folder the link creation is
protected and if not existing there the log will not be flooded with
exception messages.

bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=572233
Change-Id: I8903646321844ae5a13c955b9275c9a913237cb0
Signed-off-by: Alois Zoitl <alois.zoitl@gmx.at>
diff --git a/plugins/org.eclipse.fordiac.ide.model/src/org/eclipse/fordiac/ide/model/typelibrary/TypeLibrary.java b/plugins/org.eclipse.fordiac.ide.model/src/org/eclipse/fordiac/ide/model/typelibrary/TypeLibrary.java
index 4bc0a13..850b4b6 100644
--- a/plugins/org.eclipse.fordiac.ide.model/src/org/eclipse/fordiac/ide/model/typelibrary/TypeLibrary.java
+++ b/plugins/org.eclipse.fordiac.ide.model/src/org/eclipse/fordiac/ide/model/typelibrary/TypeLibrary.java
@@ -363,7 +363,8 @@
 		} else {
 			location = new Path(Platform.getInstallLocation().getURL().getFile() + TypeLibraryTags.TYPE_LIBRARY);
 		}
-		if (workspace.validateLinkLocation(link, location).isOK()) {
+		if (workspace.validateLinkLocation(link, location).isOK()
+				&& location.toFile().isDirectory()) {
 			try {
 				link.createLink(location, IResource.NONE, null);
 			} catch (final Exception e) {