Skip to content

Commit

Permalink
Fix setting original size for format resize action. (#1225352)
Browse files Browse the repository at this point in the history
Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
  • Loading branch information
vojtechtrefny committed Jun 3, 2015
1 parent d215b34 commit d9abca4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion blivet/deviceaction.py
Expand Up @@ -755,7 +755,12 @@ def __init__(self, device, newsize):
self.dir = RESIZE_GROW
else:
self.dir = RESIZE_SHRINK
self.origSize = self.device.format.targetSize

if device.format.targetSize > Size(0):
self.origSize = device.format.targetSize
else:
self.origSize = device.format.currentSize

self._targetSize = newsize

def apply(self):
Expand Down

0 comments on commit d9abca4

Please sign in to comment.