From 99bcfd24c70d751d0222944d15a468a6017fb660 Mon Sep 17 00:00:00 2001 From: Brian Spindler Date: Mon, 25 Mar 2013 13:20:27 -0700 Subject: [PATCH] All slashes were being removed from the storage path which caused adding the pool to break. Reviewed-by: Edison Su --- .../lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java index 2991574d021..b8b08598f69 100644 --- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java +++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java @@ -204,7 +204,7 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements String hostPath = uri.getPath(); Object localStorage = dsInfos.get("localStorage"); if (localStorage != null) { - hostPath = hostPath.replace("/", ""); + hostPath = hostPath.replaceFirst("/", ""); } String userInfo = uri.getUserInfo(); int port = uri.getPort();