Skip to content

Commit

Permalink
Merge pull request tzmax#11 from hulixia1992/hulixia1992
Browse files Browse the repository at this point in the history
fix the issue of A problem about AppDelegate/getV2rayPath method
  • Loading branch information
tzmax authored Jul 22, 2022
2 parents 1e71a98 + 6c85f90 commit e29cc5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion V2RayX/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ -(NSString*)getV2rayPath {
NSString* defaultV2ray = [NSString stringWithFormat:@"%@/xray", [[NSBundle mainBundle] resourcePath]];
NSFileManager* fileManager = [NSFileManager defaultManager];
NSString* cusV2ray = [NSString stringWithFormat:@"%@/Library/Application Support/V2RayXS/xray-core/xray",NSHomeDirectory()];
for (NSString* binary in @[@"v2ray", @"v2ctl"]) {
for (NSString* binary in @[@"xray"]) {
NSString* fullpath = [NSString stringWithFormat:@"%@/Library/Application Support/V2RayXS/xray-core/%@",NSHomeDirectory(), binary];
BOOL isDir = YES;
if (![fileManager fileExistsAtPath:fullpath isDirectory:&isDir] || isDir || ![fileManager setAttributes:@{NSFilePosixPermissions: [NSNumber numberWithShort:0777]} ofItemAtPath:fullpath error:nil]) {
Expand Down

0 comments on commit e29cc5e

Please sign in to comment.