[gparted] Ensure space available for GPT backup partition table on paste
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Ensure space available for GPT backup partition table on paste
- Date: Tue, 25 May 2010 22:27:12 +0000 (UTC)
commit ebdb9466e0403275e0c12997a60f4872e8a37b2a
Author: Curtis Gedak <gedakc gmail com>
Date: Thu May 20 15:12:14 2010 -0600
Ensure space available for GPT backup partition table on paste
src/Win_GParted.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index fb4eb06..3156882 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -889,6 +889,14 @@ void Win_GParted::set_valid_operations()
)
required_size += MEBIBYTE;
+ //Determine if space is needed for the backup partition on a GPT partition table
+ if ( ( devices[ current_device ] .disktype == "gpt" )
+ && ( ( devices[ current_device ] .length - selected_partition .sector_end )
+ < ( MEBIBYTE / devices[ current_device ] .sector_size )
+ )
+ )
+ required_size += MEBIBYTE ;
+
if ( required_size <= selected_partition .get_byte_length() )
allow_paste( true ) ;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]