File tree Expand file tree Collapse file tree
plugins/hypervisors/simulator/src/com/cloud/resource Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ public Answer backupSnapshot(CopyCommand cmd) {
151151 int index = snapshot .getPath ().lastIndexOf ("/" );
152152
153153 String snapshotName = snapshot .getPath ().substring (index + 1 );
154- String snapshotRelPath = null ;
154+ String snapshotRelPath = "snapshots" ;
155155 SnapshotObjectTO newSnapshot = new SnapshotObjectTO ();
156156 newSnapshot .setPath (snapshotRelPath + File .separator + snapshotName );
157157 return new CopyCmdAnswer (newSnapshot );
@@ -218,7 +218,6 @@ public Answer createVolumeFromSnapshot(CopyCommand cmd) {
218218 SnapshotObjectTO snapshot = (SnapshotObjectTO )srcData ;
219219 String snapshotPath = snapshot .getPath ();
220220 int index = snapshotPath .lastIndexOf ("/" );
221- snapshotPath = snapshotPath .substring (0 , index );
222221 String snapshotName = snapshotPath .substring (index + 1 );
223222 VolumeObjectTO newVol = new VolumeObjectTO ();
224223 newVol .setPath (snapshotName );
You can’t perform that action at this time.
0 commit comments