Merge pull request #1088 from owncloud/updated_docs_about_target_of_PRs
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / GetServerInfoOperation.java
index 9194c1f..1b4b7a9 100644 (file)
@@ -1,8 +1,9 @@
-/* ownCloud Android client application
+/**
+ *   ownCloud Android client application
  *
  *   @author David A. Velasco
  *   @author masensio
- *   Copyright (C) 2014 ownCloud Inc.
+ *   Copyright (C) 2015 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
@@ -116,12 +117,8 @@ public class GetServerInfoOperation extends RemoteOperation {
             if (url.endsWith("/")) {
                 url = url.substring(0, url.length() - 1);
             }
-            if(url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_4_0)){
-                url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_4_0.length());
-            } else if(url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_2_0)){
-                url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_2_0.length());
-            } else if (url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_1_2)){
-                url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_1_2.length());
+            if(url.toLowerCase().endsWith(AccountUtils.WEBDAV_PATH_4_0_AND_LATER)){
+                url = url.substring(0, url.length() - AccountUtils.WEBDAV_PATH_4_0_AND_LATER.length());
             }
         }
         return url;