@@ -39,15 +39,22 @@ public static string CheckPath(string path, IEnumerable<string> files, bool isDi
39
39
// TODO: These are all cop-outs that don't check the existence of the other files
40
40
if ( files . Count ( f => Path . GetFileName ( f ) . Equals ( "DPLAYERX.DLL" , StringComparison . OrdinalIgnoreCase ) ) > 0 )
41
41
{
42
- return GetDPlayerXVersion ( path ) ;
42
+ string file = files . First ( f => Path . GetFileName ( f ) . Equals ( "DPLAYERX.DLL" , StringComparison . OrdinalIgnoreCase ) ) ;
43
+ return GetDPlayerXVersion ( file ) ;
43
44
}
44
45
else if ( files . Count ( f => Path . GetFileName ( f ) . Equals ( "drvmgt.dll" , StringComparison . OrdinalIgnoreCase ) ) > 0 )
45
46
{
46
- return GetDrvmgtVersion ( path ) ;
47
+ string file = files . First ( f => Path . GetFileName ( f ) . Equals ( "drvmgt.dll" , StringComparison . OrdinalIgnoreCase ) ) ;
48
+ return GetDrvmgtVersion ( file ) ;
47
49
}
48
50
else if ( files . Count ( f => Path . GetFileName ( f ) . Equals ( "secdrv.sys" , StringComparison . OrdinalIgnoreCase ) ) > 0 )
49
51
{
50
- return GetSecdrvVersion ( path ) ;
52
+ string file = files . First ( f => Path . GetFileName ( f ) . Equals ( "secdrv.sys" , StringComparison . OrdinalIgnoreCase ) ) ;
53
+ return GetSecdrvVersion ( file ) ;
54
+ }
55
+ else if ( path . EndsWith ( ".SafeDiscDVD.bundle" , StringComparison . OrdinalIgnoreCase ) )
56
+ {
57
+ return "SafeDisc for Macintosh" ;
51
58
}
52
59
}
53
60
else
@@ -97,7 +104,7 @@ public static string CheckPath(string path, IEnumerable<string> files, bool isDi
97
104
98
105
private static string GetDPlayerXVersion ( string file )
99
106
{
100
- if ( file == null )
107
+ if ( file == null || ! File . Exists ( file ) )
101
108
return string . Empty ;
102
109
103
110
FileInfo fi = new FileInfo ( file ) ;
@@ -125,7 +132,7 @@ private static string GetDPlayerXVersion(string file)
125
132
126
133
private static string GetDrvmgtVersion ( string file )
127
134
{
128
- if ( file == null )
135
+ if ( file == null || ! File . Exists ( file ) )
129
136
return string . Empty ;
130
137
131
138
FileInfo fi = new FileInfo ( file ) ;
@@ -153,7 +160,7 @@ private static string GetDrvmgtVersion(string file)
153
160
154
161
private static string GetSecdrvVersion ( string file )
155
162
{
156
- if ( file == null )
163
+ if ( file == null || ! File . Exists ( file ) )
157
164
return string . Empty ;
158
165
159
166
FileInfo fi = new FileInfo ( file ) ;
@@ -187,7 +194,7 @@ private static string GetSecdrvVersion(string file)
187
194
188
195
private static string GetVersion ( string file , int position )
189
196
{
190
- if ( file == null )
197
+ if ( file == null || ! File . Exists ( file ) )
191
198
return string . Empty ;
192
199
193
200
using ( var fs = File . Open ( file , FileMode . Open , FileAccess . Read , FileShare . ReadWrite ) )
0 commit comments