Skip to content

Conversation

@ys928
Copy link

@ys928 ys928 commented Sep 24, 2025

This error will result in meaningless user input multiple times

Copy link
Contributor

@ygerlach ygerlach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to catch the case dev.length==0 i guess instead of writing to dev, App.grub_device could be used.


dev = read_stdin_device(device_list, grub_device_default);
if (dev != null) { continue; }
if (dev != null) { break; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in this comment, couldn't you assign to App.grub_device here and let the loop naturally exit?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I am not familiar with this project and only discovered this issue while using the program. And even after repeating this logic three times, the program still runs normally, so the length of App. grub_device seems insignificant? Even though it was 0, the backup operation was still performed normally, so I used the simplest repair method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants