microsoft / microsoft/P.808

AzureClipStorage breaks if one directory name is prefix of another

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
230
Forks
61
PR merge metrics
No merged PRs in 30d

Description

AzureClipStorage currently lists clips by getting all files where the file name starts with a certain string:

https://github.com/microsoft/P.808/blob/8bfc24f354607e87fa53b5a6ec9c6f3bc374638d/src/azure_clip_storage.py#L66

If there are two directories named "something/xyz" and "something/xyz_abc", then this will cause the script to also enumerate files from the second directory when looking for files from the first (which causes the script to crash). While easy to work around, this seems unintended, and should probably be changed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/azure_clip_storage.py at the linked code around line 66 and inspect how clip files are selected by name prefix. Verify the behavior with directories named "something/xyz" and "something/xyz_abc"; done means files from the longer directory are excluded when listing clips for the shorter one.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
backend, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.