Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Commit

Permalink
Add checking file existence of .plist before creating link into conta…
Browse files Browse the repository at this point in the history
…iner

Fix #15
  • Loading branch information
norio-nomura committed Mar 5, 2014
1 parent b474695 commit 30a566c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SIMBL Agent/SIMBLAgent.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ - (BOOL)injectContainerBundleIdentifier:(NSString*)bundleIdentifier enabled:(BOO
if (![fileManager linkItemAtPath:self.applicationSupportPath toPath:containerApplicationSupportPath error:&error]) {
SIMBLLogNotice(@"linkItemAtPath error:%@",error);
}
if (![fileManager linkItemAtPath:self.plistPath toPath:containerPlistPath error:&error]) {
if ([fileManager fileExistsAtPath:self.plistPath] && ![fileManager linkItemAtPath:self.plistPath toPath:containerPlistPath error:&error]) {
SIMBLLogNotice(@"linkItemAtPath error:%@",error);
}
bResult = YES;
Expand All @@ -344,7 +344,7 @@ - (BOOL)injectContainerBundleIdentifier:(NSString*)bundleIdentifier enabled:(BOO
if (![fileManager removeItemAtPath:containerApplicationSupportPath error:&error]) {
SIMBLLogNotice(@"removeItemAtPath error:%@",error);
}
if (![fileManager removeItemAtPath:containerPlistPath error:&error]) {
if ([fileManager fileExistsAtPath:containerPlistPath] && ![fileManager removeItemAtPath:containerPlistPath error:&error]) {
SIMBLLogNotice(@"removeItemAtPath error:%@",error);
}
bResult = YES;
Expand Down

0 comments on commit 30a566c

Please sign in to comment.