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

Fixed problems in GetSafeDirectories and GetDirectoryDistributedWithApplication #1370

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

tombogle
Copy link
Contributor

@tombogle tombogle commented Jan 6, 2025

In cases where a user does not have access to any one directory under consideration, these methods would fail/crash without considering the remaining directories.

  • Made GetSafeDirectories not crash and simply not return any subdirectory the user does not have permission to access.
  • In GetDirectoryDistributedWithApplication, prevented a failure in accessing one of the specified subfolders from allowing it to try the others.

This change is Reviewable

…ory the user does not have permission to access.

In GetDirectoryDistributedWithApplication, prevented a failure in accessing one of the specified subfolders from

allowing it to try the others.
@tombogle tombogle requested a review from ermshiperete January 6, 2025 13:59
@tombogle tombogle self-assigned this Jan 6, 2025
@tombogle tombogle added the fix label Jan 6, 2025
Copy link

github-actions bot commented Jan 6, 2025

Palaso Tests

     3 files  ±0       3 suites  ±0   13m 59s ⏱️ - 1m 43s
 4 885 tests ±0   4 652 ✅ ±0  233 💤 ±0  0 ❌ ±0 
14 118 runs  ±0  13 487 ✅ ±0  631 💤 ±0  0 ❌ ±0 

Results for commit e8eb899. ± Comparison against base commit 3086d27.

♻️ This comment has been updated with latest results.

@tombogle tombogle requested a review from FoolRunning January 6, 2025 14:36
SIL.Core/IO/DirectoryHelper.cs Outdated Show resolved Hide resolved
SIL.Core/IO/FileLocationUtilities.cs Outdated Show resolved Hide resolved
SIL.Core/IO/FileLocationUtilities.cs Show resolved Hide resolved
…ur with one or more folders.

Also fixed some typos and did other minor code cleanup in Logger.cs
Copy link
Contributor Author

@tombogle tombogle left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 3 unresolved discussions (waiting on @ermshiperete and @FoolRunning)

SIL.Core/IO/FileLocationUtilities.cs Outdated Show resolved Hide resolved
SIL.Core/IO/FileLocationUtilities.cs Show resolved Hide resolved
Copy link
Member

@ermshiperete ermshiperete left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @FoolRunning)

SIL.Core/IO/DirectoryHelper.cs Outdated Show resolved Hide resolved
@tombogle tombogle merged commit e89f76b into master Jan 7, 2025
7 checks passed
@tombogle tombogle deleted the robust-file-utilities branch January 7, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants