-
Notifications
You must be signed in to change notification settings - Fork 644
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
Bugfix for PostProcess Stats job #10282
base: dev
Are you sure you want to change the base?
Changes from 9 commits
16f1755
9155726
fabc79f
f8c5829
4a4b0f1
b14c3fc
97e310d
3d55f83
b67bd58
cbf5066
bb807d0
03e111c
7693ca6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"rollForward": "latestFeature", | ||
"allowPrerelease": false | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
|
@@ -57,6 +57,9 @@ public override Task<IEnumerable<StorageListItem>> ListAsync(bool getMetadata, C | |
return Task.FromResult<IEnumerable<StorageListItem>>(List(getMetadata)); | ||
} | ||
|
||
public override Task<IEnumerable<StorageListItem>> ListTopLevelAsync(bool getMetadata, CancellationToken cancellationToken) => | ||
ListTopLevelAsync(getMetadata, cancellationToken); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar concern here. It should not call itself, but actually list files like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed, work item filed here |
||
|
||
public string Path | ||
{ | ||
get; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,7 @@ public async Task<string> LoadString(Uri resourceUri, CancellationToken cancella | |
public abstract Task<bool> ExistsAsync(string fileName, CancellationToken cancellationToken); | ||
public abstract IEnumerable<StorageListItem> List(bool getMetadata); | ||
public abstract Task<IEnumerable<StorageListItem>> ListAsync(bool getMetadata, CancellationToken cancellationToken); | ||
public abstract Task<IEnumerable<StorageListItem>> ListTopLevelAsync(bool getMetadata, CancellationToken cancellationToken); | ||
|
||
public bool Verbose | ||
{ | ||
|
@@ -209,6 +210,12 @@ protected string GetName(Uri uri) | |
{ | ||
name = name.Substring(0, name.IndexOf("#")); | ||
} | ||
|
||
if (name.Contains("?")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the query ( [edit:] With reordering these, you can also make the second check an Alternatively, you could do a single pass with IndexOfAny, which would also save a second iteration over the string. |
||
{ | ||
name = name.Substring(0, name.IndexOf("?")); | ||
} | ||
|
||
return name; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it call itself? It will fail with stack overflow exception.
Should it be
_primaryStorage.ListTopLevelAsync
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, fixing now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved