diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java index 418dd0c97d8..527b32f9d61 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java +++ b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java @@ -151,7 +151,7 @@ public class SimulatorStorageProcessor implements StorageProcessor { int index = snapshot.getPath().lastIndexOf("/"); String snapshotName = snapshot.getPath().substring(index + 1); - String snapshotRelPath = null; + String snapshotRelPath = "snapshots"; SnapshotObjectTO newSnapshot = new SnapshotObjectTO(); newSnapshot.setPath(snapshotRelPath + File.separator + snapshotName); return new CopyCmdAnswer(newSnapshot); @@ -218,7 +218,6 @@ public class SimulatorStorageProcessor implements StorageProcessor { SnapshotObjectTO snapshot = (SnapshotObjectTO)srcData; String snapshotPath = snapshot.getPath(); int index = snapshotPath.lastIndexOf("/"); - snapshotPath = snapshotPath.substring(0, index); String snapshotName = snapshotPath.substring(index + 1); VolumeObjectTO newVol = new VolumeObjectTO(); newVol.setPath(snapshotName);