-
When composing a copy operation it always named the destination partition as "copy of /dev/SRC". For the case of pasting into unallocated space creating a new partition this was the right thing to do as the partition doesn't yet exist so the path is not yet known. However for the case of pasting into an existing partition the path is known and replacing it with "copy of /dev/SRC" is wrong. No other operation when operating on an existing partition changes it path. Given a set of existing partitions, sdb1 to sdb4, compose a set of copy operations as: copy sdb1 to sdb2, copy sdb2 to sdb3 and copy sdb3 to sdb4. The displayed partitions before being applied become: /dev/sdb1 copy of /dev/sdb1 copy of copy of /dev/sdb1 copy of copy of copy of /dev/sdb1 And the pending operations are named: Copy /dev/sdb1 to /dev/sdb2 Copy copy of /dev/sdb1 to /dev/sdb3 Copy copy of copy of /dev/sdb1 to /sev/sdb4 This is perverse. In the case of pasting into an existing partition keep the real path name. This keeps the partitions being displayed as: /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4 And the pending operations named as: Copy /dev/sdb1 to /dev/sdb2 Copy /dev/sdb2 to /dev/sdb3 Copy /dev/sdb3 to /dev/sdb4 Much more understandable. Also switch to an upper case "C" in "Copy of /dev/SRC" as the temporary path name when pasting into unallocated space. Finally update the comment in calibrate_partition() to describe the remaining cases when re-adding the path is still required. Bug 766349 - Resolve code ugliness with partition path getting set to "copy of /dev/SRC"
302cc804