File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -80,27 +80,6 @@ static bool detectOSCodeName(FFOSResult* os)
8080 return false ;
8181}
8282
83- static void parseOSXSoftwareLicense (FFOSResult* os)
84- {
85- FF_AUTO_CLOSE_FILE FILE* rtf = fopen (" /System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf" , " r" );
86- if (rtf == NULL )
87- return ;
88-
89- FF_AUTO_FREE char * line = NULL ;
90- size_t len = 0 ;
91- const char * searchStr = " \\ f0\\ b SOFTWARE LICENSE AGREEMENT FOR macOS " ;
92- while (getline (&line, &len, rtf) != EOF)
93- {
94- if (ffStrStartsWith (line, searchStr))
95- {
96- ffStrbufAppendS (&os->codename , line + strlen (searchStr));
97- ffStrbufTrimRight (&os->codename , ' \n ' );
98- ffStrbufTrimRight (&os->codename , ' \\ ' );
99- break ;
100- }
101- }
102- }
103-
10483void ffDetectOSImpl (FFOSResult* os)
10584{
10685 parseSystemVersion (os);
@@ -115,6 +94,5 @@ void ffDetectOSImpl(FFOSResult* os)
11594
11695 ffStrbufAppend (&os->versionID , &os->version );
11796
118- if (!detectOSCodeName (os))
119- parseOSXSoftwareLicense (os);
97+ detectOSCodeName (os);
12098}
You can’t perform that action at this time.
0 commit comments