Warn when the source drive has no partition table

Changelog-entry: Warn when the source drive has no partition table
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-11-20 15:29:03 +01:00
parent 0597c0e908
commit c69b2fa053
2 changed files with 17 additions and 0 deletions

View File

@ -419,6 +419,15 @@ export class SourceSelector extends React.Component<
}
}
} else {
if (selected.partitionTableType === null) {
analytics.logEvent('Missing partition table', { selected });
this.setState({
warning: {
message: messages.warning.driveMissingPartitionTable(),
title: 'Missing partition table',
},
});
}
metadata = {
path: selected.device,
displayName: selected.displayName,

View File

@ -117,6 +117,14 @@ export const warning = {
].join(' ');
},
driveMissingPartitionTable: () => {
return outdent({ newline: ' ' })`
It looks like this is not a bootable drive.
The drive does not appear to contain a partition table,
and might not be recognized or bootable by your device.
`;
},
largeDriveSize: () => {
return 'This is a large drive! Make sure it doesn\'t contain files that you want to keep.';
},