diff options
| -rw-r--r-- | macosx/PcsxrPlugin.h | 1 | ||||
| -rw-r--r-- | macosx/PcsxrPlugin.m | 7 | ||||
| -rw-r--r-- | macosx/PcsxrPluginHandler.m | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/macosx/PcsxrPlugin.h b/macosx/PcsxrPlugin.h index c971f87c..8a1116ab 100644 --- a/macosx/PcsxrPlugin.h +++ b/macosx/PcsxrPlugin.h @@ -15,6 +15,7 @@ NSString *path; NSDate *modDate; NSString *name; + NSString *fullPlugPath; long version; int type; int active; diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m index 5b3dfbe2..cc35a1f7 100644 --- a/macosx/PcsxrPlugin.m +++ b/macosx/PcsxrPlugin.m @@ -154,6 +154,7 @@ // save the current modification date NSDictionary *fattrs = [[NSFileManager defaultManager] attributesOfItemAtPath:[goodPath stringByResolvingSymlinksInPath] error:NULL]; modDate = [[fattrs fileModificationDate] retain]; + fullPlugPath = [goodPath retain]; active = 0; @@ -176,6 +177,7 @@ [modDate release]; [path release]; [name release]; + [fullPlugPath release]; [super dealloc]; } @@ -328,11 +330,10 @@ { // check that the file is still there with the same modification date NSFileManager *dfm = [NSFileManager defaultManager]; - NSString *fullPath = [[dfm stringWithFileSystemRepresentation:Config.PluginsDir length:strlen(Config.PluginsDir)] stringByAppendingPathComponent:path]; - if (![dfm fileExistsAtPath:fullPath]) + if (![dfm fileExistsAtPath:fullPlugPath]) return NO; - NSDictionary *fattrs = [dfm attributesOfItemAtPath:[fullPath stringByResolvingSymlinksInPath] error:NULL]; + NSDictionary *fattrs = [dfm attributesOfItemAtPath:[fullPlugPath stringByResolvingSymlinksInPath] error:NULL]; return [[fattrs fileModificationDate] isEqualToDate:modDate]; } diff --git a/macosx/PcsxrPluginHandler.m b/macosx/PcsxrPluginHandler.m index 8a978876..48f758af 100644 --- a/macosx/PcsxrPluginHandler.m +++ b/macosx/PcsxrPluginHandler.m @@ -67,7 +67,7 @@ [url path], [wrapper filename]]; if ([wrapper writeToFile:dst atomically:NO updateFilenames:NO]) { - [[NSWorkspace sharedWorkspace] noteFileSystemChanged:[[NSBundle mainBundle] builtInPlugInsPath]]; + [[NSWorkspace sharedWorkspace] noteFileSystemChanged:[url path]]; NSRunInformationalAlertPanel(NSLocalizedString(@"Installation Succesfull", nil), NSLocalizedString(@"The installation of the specified plugin was succesfull. In order to use it, please restart the application.", nil), nil, nil, nil); |
