mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
Merge pull request #3166 from balena-io/init-param-issourcedrive
Init param in correct place
This commit is contained in:
commit
959b9ffbac
@ -58,8 +58,10 @@ export interface Image {
|
||||
* In the context of Etcher, a source drive is a drive
|
||||
* containing the image.
|
||||
*/
|
||||
export function isSourceDrive(drive: DrivelistDrive, image: Image): boolean {
|
||||
image = image || {};
|
||||
export function isSourceDrive(
|
||||
drive: DrivelistDrive,
|
||||
image: Image = {},
|
||||
): boolean {
|
||||
for (const mountpoint of drive.mountpoints || []) {
|
||||
if (image.path !== undefined && pathIsInside(image.path, mountpoint.path)) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user