From 7b0f06bc86b61a18d94679fc9e400c42ec01d4b0 Mon Sep 17 00:00:00 2001
From: pkupczyk <pkupczyk>
Date: Fri, 16 Aug 2013 07:49:34 +0000
Subject: [PATCH] SP-816 / BIS-503 : SOB-125 make the Matlab client work with
 older servers

SVN: 29656
---
 .../openbis/dss/client/api/v1/impl/DssComponent.java  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java
index ba5c63bb2d1..efd396afde8 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java
@@ -697,8 +697,15 @@ class AuthenticatedState extends AbstractDssComponentState
 
         try
         {
-            return dataSetDss.getService().tryGetPathToDataSet(getSessionToken(),
-                    dataSetDss.getCode(), overrideStoreRootPathOrNull);
+            if (minorVersion < 8)
+            {
+                return dataSetDss.getService().getPathToDataSet(getSessionToken(),
+                        dataSetDss.getCode(), overrideStoreRootPathOrNull);
+            } else
+            {
+                return dataSetDss.getService().tryGetPathToDataSet(getSessionToken(),
+                        dataSetDss.getCode(), overrideStoreRootPathOrNull);
+            }
         } catch (IllegalArgumentException e)
         {
             // We could not create a link, return null
-- 
GitLab