Rev 370 | Rev 373 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 370 | Rev 371 | ||
---|---|---|---|
Line 441... | Line 441... | ||
441 | PIDISPOSEHANDLE(h); |
441 | PIDISPOSEHANDLE(h); |
442 | } |
442 | } |
443 | return NULL; |
443 | return NULL; |
444 | } |
444 | } |
445 | 445 | ||
446 | Boolean fileHasExtension(StandardFileReply *sfr, const char* extension) { |
- | |
447 | #ifdef WIN_ENV |
- | |
448 | - | ||
449 | char name[MAX_PATH+1]; |
- | |
450 | return sfr->nFileExtension && !strcasecmp(myp2cstrcpy(name,sfr->sfFile.name) + sfr->nFileExtension - 1,extension); |
- | |
451 | - | ||
452 | #else |
- | |
453 | - | ||
454 | char name[1025]; // https://stackoverflow.com/questions/1295135/longest-pathname-string-in-mac-os-x-hfs |
- | |
455 | char* s = myp2cstrcpy(name,sfr->sfFile.name); |
- | |
456 | return strcmp(s + strlen(s) - strlen(extension), extension) == 0; |
- | |
457 | - | ||
458 | #endif |
- | |
459 | } |
- | |
460 | - | ||
461 | Boolean readfile_afs_pff(StandardFileReply *sfr,char **reason){ |
446 | Boolean readfile_afs_pff(StandardFileReply *sfr,char **reason){ |
462 | FILEREF r; |
447 | FILEREF r; |
463 | Handle h; |
448 | Handle h; |
464 | Boolean res = false; |
449 | Boolean res = false; |
465 | 450 |