summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-17 21:44:51 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-12-17 21:44:51 +0000
commit7264f33c12473e0c77357cff952056550e5eae76 (patch)
treec5097feb1e3494b7d4e7a16a0e8f83f6455df423
parenta603862e8da2d061f728a373acb503fa374b8c6b (diff)
downloadpcsxr-7264f33c12473e0c77357cff952056550e5eae76.tar.gz
Tell NSWorkspace to note the proper file path changed in PcsxrPluginHandler.
Store the full path in PcsxrPlugin to check against in verifyOK function. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@73440 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--macosx/PcsxrPlugin.h1
-rw-r--r--macosx/PcsxrPlugin.m7
-rw-r--r--macosx/PcsxrPluginHandler.m2
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);