Skip to content

Bugfix/file sorting #78

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

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Conversation

ubidefeo
Copy link
Collaborator

fixed file sorting for both board and disk

@ubidefeo ubidefeo requested a review from murilopolese January 10, 2024 11:34
Copy link
Contributor

@murilopolese murilopolese left a comment

Choose a reason for hiding this comment

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

There is some commented code and console log left behind.
I also made a suggestion on the sorting function name.

index.js Outdated
@@ -19,6 +19,13 @@ function listFolder(folder) {
let filePath = path.resolve(folder, f)
return !fs.lstatSync(filePath).isDirectory()
})

Copy link
Contributor

Choose a reason for hiding this comment

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

The old code is still commented.

const files = await serial.ilistFiles(path)
return files.map(f => ({
let files = await serial.ilistFiles(path)
console.log(files)
Copy link
Contributor

Choose a reason for hiding this comment

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

Console log

return files
}

function filesSortAlphabetically(entryA, entryB) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to propose the function name to be sortFilesAlphabetically to more or less follow the verb-noun names of other methods.

@ubidefeo
Copy link
Collaborator Author

will update and PR again :)

@ubidefeo
Copy link
Collaborator Author

@murilopolese I have fixed the PR

@ubidefeo ubidefeo merged commit 39ea89c into arduino:development Jan 10, 2024
@ubidefeo ubidefeo deleted the bugfix/file-sorting branch January 10, 2024 15:13
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