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

Fix scanning #5945

Merged
merged 1 commit into from May 1, 2021
Merged

Fix scanning #5945

Changes from all commits
Commits
File filter
Filter file types
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -260,8 +260,6 @@ private FileSystemMetadata GetFileSystemMetadata(FileSystemInfo info)
result.Exists = false;
}
}

result.DirectoryName = fileInfo.DirectoryName;
}

result.CreationTimeUtc = GetCreationTimeUtc(info);
@@ -683,7 +683,7 @@ public IEnumerable<BaseItem> ResolvePaths(IEnumerable<FileSystemMetadata> files,

foreach (var item in items)
{
ResolverHelper.SetInitialItemValues(item, parent, _fileSystem, this, directoryService);
ResolverHelper.SetInitialItemValues(item, parent, this, directoryService);
}

items.AddRange(ResolveFileList(result.ExtraFiles, directoryService, parent, collectionType, resolvers, libraryOptions));
@@ -20,11 +20,10 @@ public static class ResolverHelper
/// </summary>
/// <param name="item">The item.</param>
/// <param name="parent">The parent.</param>
/// <param name="fileSystem">The file system.</param>
/// <param name="libraryManager">The library manager.</param>
/// <param name="directoryService">The directory service.</param>
/// <exception cref="ArgumentException">Item must have a path.</exception>
public static void SetInitialItemValues(BaseItem item, Folder? parent, IFileSystem fileSystem, ILibraryManager libraryManager, IDirectoryService directoryService)
public static void SetInitialItemValues(BaseItem item, Folder? parent, ILibraryManager libraryManager, IDirectoryService directoryService)
{
// This version of the below method has no ItemResolveArgs, so we have to require the path already being set
if (string.IsNullOrEmpty(item.Path))
@@ -87,7 +87,7 @@ public bool IsVf
return false;
}

var parentDir = FileInfo.DirectoryName ?? string.Empty;
var parentDir = System.IO.Path.GetDirectoryName(Path) ?? string.Empty;

return parentDir.Length > _appPaths.RootFolderPath.Length
&& parentDir.StartsWith(_appPaths.RootFolderPath, StringComparison.OrdinalIgnoreCase);
@@ -37,12 +37,6 @@ public class FileSystemMetadata
/// <value>The length.</value>
public long Length { get; set; }

/// <summary>
/// Gets or sets the name of the directory.
/// </summary>
/// <value>The name of the directory.</value>
public string DirectoryName { get; set; }

/// <summary>
/// Gets or sets the last write time UTC.
/// </summary>
ProTip! Use n and p to navigate between commits in a pull request.