Commit 22d02ecd authored by Yavor Doganov's avatar Yavor Doganov

make-v2-strict.patch: Fix logic when setting flattened.

parent c414c767
......@@ -158,28 +158,34 @@ Last-Update: 2018-05-10
@implementation AppFileWrapper
- (void)dealloc
@@ -824,12 +857,15 @@
@@ -824,17 +857,19 @@
- (NSFileWrapper *)saveWrapper
{
-
- NSString *flattenedString = [[[NSProcessInfo processInfo] environment] objectForKey: @"GNUSTEP_FLATTENED"];
- BOOL flattened;
+ /* Try to obtain GNUSTEP_IS_FLATTENED from the environment, in
+ * case GNUSTEP_SH_EXPORT_ALL_VARIABLES is defined. Resort to the
+ * slower method if it's not exported. */
+ NSString *flattenedString = [[[NSProcessInfo processInfo] environment] objectForKey: @"GNUSTEP_IS_FLATTENED"];
+ BOOL flattened = NO;
BOOL flattened;
if ( flattenedString == nil ) {
- NSLog(@"GNUSTEP_FLATTENED not set");
- flattened = NO;
- }
- else {
- flattened = [flattenedString isEqualToString: @"yes"];
+ flattenedString = getVar(@"GNUSTEP_IS_FLATTENED");
+ if ( [flattenedString isEqualToString: @""] )
+ NSLog(@"GNUSTEP_IS_FLATTENED not set");
}
else {
flattened = [flattenedString isEqualToString: @"yes"];
@@ -954,6 +990,13 @@
+ flattened = [flattenedString isEqualToString: @"yes"];
+
//NSSize iconSize = NSMakeSize(48, 48);
NSData *data;
NSDictionary *dict;
@@ -954,6 +989,13 @@
[environment objectForKey: @"LIBRARY_COMBO"],
nil];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment