File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ - (id)initWithName:(NSString *)name
4747 _organizeationName = [self getOrganizeationName ];
4848 NSString *infoplistName = [self infoplistNameWithAtScheme: name];
4949
50-
5150 NSString *infoPath = [path stringByAppendingPathComponent: [NSString stringWithFormat: @" %@ " , infoplistName]];
5251
5352
Original file line number Diff line number Diff line change 88
99#import " VVDocumenterSetting.h"
1010#import < Carbon/Carbon.h>
11+ #import " VVProject.h"
1112
1213NSString *const VVDDefaultTriggerString = @" ///" ;
1314NSString *const VVDDefaultAuthorString = @" " ;
@@ -191,8 +192,18 @@ -(void) setUseAuthorInformation:(BOOL)useAuthorInformation
191192
192193-(NSString *)authorInformation {
193194 NSString *authorInformation = [[NSUserDefaults standardUserDefaults ] objectForKey: kVVDAuthorInfomation ];
194- if (authorInformation == nil ) {
195- authorInformation = VVDDefaultAuthorString;
195+ if (authorInformation.length <= 0 ) {
196+ NSString *name = [[VVProject projectForKeyWindow ] organizeationName ];
197+ if (name.length <= 0 ) {
198+ NSDictionary *environment = [[NSProcessInfo processInfo ] environment ];
199+ name = [environment objectForKey: @" LOGNAME" ];
200+ }
201+
202+ if (name.length > 0 ) {
203+ authorInformation = name;
204+ }else {
205+ authorInformation = VVDDefaultAuthorString;
206+ }
196207 }
197208 return authorInformation;
198209}
You can’t perform that action at this time.
0 commit comments