This repository was archived by the owner on Mar 29, 2026. It is now read-only.
Open
Conversation
…path with backslashes for globPattern, uncomment await for uploadPromises
hansent
reviewed
May 31, 2023
| const globPattern = path.join(dirName, "**/*"); | ||
|
|
||
| return glob.sync(globPattern); | ||
| return glob.sync(globPattern.replace(/\\/g, '/')); |
Contributor
There was a problem hiding this comment.
I think this probably needs a check to only do this on windows?
hansent
suggested changes
May 31, 2023
Contributor
hansent
left a comment
There was a problem hiding this comment.
Thank you for the PR.
I think in order to include this we need two changes:
- only replace the slashes in the pattern on windows
- add some unit tests the functionality
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Import command (e.g.
roboflow import C:\Users\Jake\Downloads\Aerial_Maritime.v24i.yolov8 -p test-zixpewould not work on windows, and just failed silently.Replace forward slashes in globPattern with backslashes, needs to be in POSIX format. See https://stackoverflow.com/questions/55512907/node-glob-sync-returns-empty-array
It seems to me like this only works for PASCAL VOC format. I tried uploading YOLOv8 PyTorch TXT annotations, which didn't work, and just resulted in annotations covering the entire image. PASCAL VOC seems to work.
Description
Please include a summary of the change and which issue is fixed or implemented. Please also include relevant motivation and context (e.g. links, docs, tickets etc.).
Uncommented
await Promise.all(uploadPromises);inupload.jsReplace forward slashes with backslashes to match format expected by
glob.syncType of change