CLOUDSTACK-5933 Problem with VMware snapshot when datastore has a space in its name

Handling spaces in datastore name while extracting vmdk base name

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
Sateesh Chodapuneedi 2014-12-09 05:34:41 +05:30
parent ca121336a0
commit aa84b05491

View File

@ -1285,7 +1285,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
vmdkName = fullPath; // for managed storage, vmdkName == fullPath
}
else {
vmdkName = fullPath.split(" ")[1];
vmdkName = fullPath.split("] ")[1];
if (vmdkName.endsWith(".vmdk")) {
vmdkName = vmdkName.substring(0, vmdkName.length() - (".vmdk").length());