Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] File Extensions filters < 3 chars not working #8

Closed
bazz1tv opened this issue Jul 20, 2015 · 6 comments
Closed

[OSX] File Extensions filters < 3 chars not working #8

bazz1tv opened this issue Jul 20, 2015 · 6 comments

Comments

@bazz1tv
Copy link

bazz1tv commented Jul 20, 2015

I originally wanted to add a file extension for 7-zip files (7z) but it would not work.. After some experimenting, I found that "e7" also did not work but "e7e" did work... I also could not get "7z " or " 7z" to work..

I could not find any NFD code that alluded to constraining the file extension to 3-chars, making me wonder if this is a different issue outside of NFD.. here are the relevant functions regarding the filter list:

NFD_OpenDialogMultiple
AddFilterListToDialog
BuildAllowedFileTypes

I am not skilled with OBJC so I'm not sure how to fix the problem.

@bazz1tv
Copy link
Author

bazz1tv commented Jul 20, 2015

OBJC debug message showing that the third char is inherited from the previous 3-char-extension (works with other chars)
(
spc,
rsn,
rar,
7zr
)

Also, if I manually craft a NSArray it will work, ie
NSArray *array = @[@"spc", @"7z", @"rar"];

@bazz1tv
Copy link
Author

bazz1tv commented Jul 20, 2015

OK I figured out the "apparent" solution .. not sure if this produces side-FX ..
nfd_cocoa.m : 25
// remove or comment ++p_typebuf;

I've studied it, I don't feel like explaining sorry, but I'm convinced. (y)

@bazz1tv
Copy link
Author

bazz1tv commented Jul 21, 2015

here's a link to a commit where I fixed the issue in NFD for my project: bazz1tv/snestracker@e79571a

@mlabbe
Copy link
Owner

mlabbe commented Jul 21, 2015

Thanks for the link! Can you supply a simple, buildable program that demonstrates the bug? It might be convenient for you to do this by modifying one of the programs in the test subdir of the repo.

@bazz1tv
Copy link
Author

bazz1tv commented Jul 24, 2015

I'm sorry but there's no way I'm going to do this. I guess I don't have the time to go off and work to explain a one-liner patch.

@mlabbe
Copy link
Owner

mlabbe commented Jul 24, 2015

This isn't a livejournal for your complaints, it's an issue tracker. Don't come back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants