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

Filtering extensions that FieReader can read #137

Merged
merged 3 commits into from
Aug 28, 2018

Conversation

ptrendx
Copy link
Member

@ptrendx ptrendx commented Aug 24, 2018

Signed-off-by: ptredak ptredak@nvidia.com

Signed-off-by: ptredak <ptredak@nvidia.com>
@ptrendx ptrendx requested a review from JanuszL August 24, 2018 16:50
Copy link
Contributor

@JanuszL JanuszL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this case insensitive.

Signed-off-by: ptredak <ptredak@nvidia.com>
@ptrendx
Copy link
Member Author

ptrendx commented Aug 24, 2018

Done.

for (const std::string& s : valid_extensions) {
size_t pos = full_path.rfind(s);
if (pos != std::string::npos && pos + s.size() == full_path.size()) {
file_label_pairs->push_back(std::make_pair(full_path, label));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now lower case path is added to list, but FS is case sensitive and if there is any uppercase in the real path it would fail opening it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Facepalm. Yup, I will change that on Monday.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happens:)

Signed-off-by: ptredak <ptredak@nvidia.com>
@JanuszL JanuszL merged commit 95e0fe7 into NVIDIA:master Aug 28, 2018
drivanov pushed a commit to drivanov/DALI that referenced this pull request Sep 4, 2018
* Filtering extensions that FieReader can read

Signed-off-by: ptredak <ptredak@nvidia.com>

* Make filtering case insensitive

Signed-off-by: ptredak <ptredak@nvidia.com>

* Change copy of full path to lowercase

Signed-off-by: ptredak <ptredak@nvidia.com>
Signed-off-by: Andrei <andreii@nvidia.com>
drivanov pushed a commit to drivanov/DALI that referenced this pull request Sep 4, 2018
* Filtering extensions that FieReader can read

Signed-off-by: ptredak <ptredak@nvidia.com>

* Make filtering case insensitive

Signed-off-by: ptredak <ptredak@nvidia.com>

* Change copy of full path to lowercase

Signed-off-by: ptredak <ptredak@nvidia.com>
Signed-off-by: Andrei <andreii@nvidia.com>
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

Successfully merging this pull request may close these issues.

2 participants