FOGProject / fos

FOG Operating System
31 stars 33 forks source link

Change label test for reserved partition #13

Closed Quazz closed 5 years ago

Quazz commented 5 years ago

It's been a long standing problem that the test fails for the label of the System Reserved partition for certain languages.

The test has been updated to work across more languages now. It's slightly less precise, but more neat and should now work for English, French and Dutch (and possibly others that I didn't think about or don't know well enough).

The original test had an é in the middle which never matched and thus French users had resize problems all the time. This could of course simply be edited, but I wanted to push this new regex instead as it also works for Dutch.

Quazz commented 5 years ago

https://forums.fogproject.org/topic/12428/win7x64-golden-image-partitions-problems-again/

For reference as to what started this quest.

Also noticed a small issue with another regex that should hopefully be resolved now too.

Sebastian-Roth commented 5 years ago

@Quazz Now that I have time to look into this may I ask you a question:

The original case statement in fog.upload had *[Rr][Ee][Cc][Oo][Vv][Ee][Rr][Yy]* in it as well. Did you drop this by intention? I think it's important to keep that. Maybe just like that if [[ $label =~ [Rr][EeÉé][Ss][Ee][Rr][Vv][EeÉé][Dd]? || $label =~ [Rr][Ee][Cc][Oo][Vv][Ee][Rr][Yy] ]]; then (By the way, I really like the regex you came up with to match English and French!)

What do you think?

Quazz commented 5 years ago

Ah, yeah, I kind of glossed over that and forgot to include that one. Updating now.

Sebastian-Roth commented 5 years ago

Whoops, lost track of this. Merging now. Thanks again for this fix!