Rev 194 | Rev 206 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 194 | Rev 198 | ||
---|---|---|---|
Line 257... | Line 257... | ||
257 | OSErr e; |
257 | OSErr e; |
258 | FSSpec origfss; |
258 | FSSpec origfss; |
259 | 259 | ||
260 | e = FSpDelete(&sfr->sfFile); |
260 | e = FSpDelete(&sfr->sfFile); |
261 | if(e && e != fnfErr){ |
261 | if(e && e != fnfErr){ |
262 | alertuser(my_strdup("Can't replace the existing file. Try a different name or location."),my_strdup("")); |
262 | alertuser(_strdup("Can't replace the existing file. Try a different name or location."),_strdup("")); |
263 | return userCanceledErr; |
263 | return userCanceledErr; |
264 | } |
264 | } |
265 | 265 | ||
266 | if( !(e = FileCopy(plugvol,plugdir,plugname, sfr->sfFile.vRefNum,sfr->sfFile.parID,NULL, sfr->sfFile.name,NULL,0,false)) |
266 | if( !(e = FileCopy(plugvol,plugdir,plugname, sfr->sfFile.vRefNum,sfr->sfFile.parID,NULL, sfr->sfFile.name,NULL,0,false)) |
267 | && !(e = FSMakeFSSpec(plugvol,plugdir,plugname,&origfss)) ) |
267 | && !(e = FSMakeFSSpec(plugvol,plugdir,plugname,&origfss)) ) |
Line 285... | Line 285... | ||
285 | e = make_singlefile(sfr,plugvol,plugdir,plugname); |
285 | e = make_singlefile(sfr,plugvol,plugdir,plugname); |
286 | #endif |
286 | #endif |
287 | } |
287 | } |
288 | 288 | ||
289 | if(e && e != userCanceledErr) { |
289 | if(e && e != userCanceledErr) { |
290 | alertuser(my_strdup("Could not create standalone plugin."),reason); |
290 | alertuser(_strdup("Could not create standalone plugin."),reason); |
291 | } else { |
291 | } else { |
292 | showmessage(my_strdup("Filter was sucessfully created")); |
292 | showmessage(_strdup("Filter was sucessfully created")); |
293 | } |
293 | } |
294 | 294 | ||
295 | return e; |
295 | return e; |
296 | } |
296 | } |