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

dataset mode list file #9

Open
eugenelyj opened this issue Mar 6, 2018 · 1 comment
Open

dataset mode list file #9

eugenelyj opened this issue Mar 6, 2018 · 1 comment

Comments

@eugenelyj
Copy link

in file ORBSLAMForDatasetActivity.java:151, a line of code for (File file : dir.listFiles()) should be improved because the method listFiles makes no guarantees about the order of the files returned

@xAffinity
Copy link

Hi , you are right, I solved it by adding the follow lines in ORBSLAMForDataSetActivity.java

import java.util.Arrays;
...
...
...
...
if (!TextUtils.isEmpty(ImgPath)) {
File dir = new File(ImgPath);
File[] files = dir.listFiles();
Arrays.sort(files);
if (dir.isDirectory()) {
for (File file : files) {

...
...
...

Hope this helps!

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