Skip to content

Commit

Permalink
Reto mouredev#48 correcciones
Browse files Browse the repository at this point in the history
  • Loading branch information
deathwing696 committed Dec 12, 2023
1 parent 4df8b87 commit d27e9bf
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Retos/Reto #48 - EL RANKING [Difícil]/c#/deathwing696.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,15 @@ static async Task ProcessContentsAsync(GitHubClient github, string owner, string
foreach (var content in contents)
{
if (content.Type == ContentType.Dir)
{
// Decodificar la ruta de la carpeta antes de la llamada recursiva
var decodedSubfolderPath = Uri.UnescapeDataString(content.Path);
// Obtener los contenidos de cada subdirectorio de manera recursiva
{
var decodedSubfolderPath = Uri.UnescapeDataString(content.Path);
var subfolderContents = await github.Repository.Content.GetAllContentsByRef(owner, repo, decodedSubfolderPath, branch);
await ProcessContentsAsync(github, owner, repo, subfolderContents, branch, aportaciones);
}
else if (content.Type == ContentType.File)
{
// El nombre del usuario es el nombre del archivo sin la extensión
{
var username = System.IO.Path.GetFileNameWithoutExtension(content.Name);

if (!aportaciones.Any(mi_objeto => mi_objeto.Nombre_usuario == username))
{
Conteo usuario = new Conteo(username);
Expand All @@ -94,7 +92,6 @@ static async Task ProcessContentsAsync(GitHubClient github, string owner, string

usuario.Num_veces++;
}

}
}
}
Expand Down

0 comments on commit d27e9bf

Please sign in to comment.