[gparted] Skip copy action because linux-swap does not contain data
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Skip copy action because linux-swap does not contain data
- Date: Tue, 19 Oct 2010 19:45:45 +0000 (UTC)
commit 42dafa2e6a1147a10acbe5f4179500fd10686105
Author: Curtis Gedak <gedakc gmail com>
Date: Tue Oct 19 10:02:18 2010 -0600
Skip copy action because linux-swap does not contain data
This change is related to the following bug report:
Bug #589555 - Moving a swap partition needlessly copies
all "data" on it
src/linux_swap.cc | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/linux_swap.cc b/src/linux_swap.cc
index a9df279..946f276 100644
--- a/src/linux_swap.cc
+++ b/src/linux_swap.cc
@@ -1,5 +1,5 @@
/* Copyright (C) 2004 Bart
- * Copyright (C) 2008, 2009 Curtis Gedak
+ * Copyright (C) 2008, 2009, 2010 Curtis Gedak
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ FS linux_swap::get_filesystem_support()
if ( ! Glib::find_program_in_path( "swaplabel" ) .empty() )
fs .write_label = FS::EXTERNAL ;
- fs .copy = GParted::FS::GPARTED ;
+ fs .copy = GParted::FS::EXTERNAL ;
fs .move = GParted::FS::GPARTED ;
return fs ;
@@ -97,6 +97,18 @@ bool linux_swap::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
+ //Since linux-swap does not contain data, do not actually copy the partition
+ operationdetail .add_child(
+ OperationDetail(
+ /* TO TRANSLATORS: looks like Partition copy action skipped because linux-swap file system does not contain data */
+ String::ucompose( _("Partition copy action skipped because %1 file system does not contain data")
+ , Utils::get_filesystem_string( FS_LINUX_SWAP )
+ )
+ , STATUS_NONE
+ , FONT_ITALIC
+ )
+ ) ;
+
return true ;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]