mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 13:28:27 +01:00
improve smb support
This commit is contained in:
@@ -352,7 +352,7 @@ namespace Emby.Server.Implementations.FileOrganization
|
||||
_libraryMonitor.ReportFileSystemChangeBeginning(path);
|
||||
|
||||
var renameRelatedFiles = !hasRenamedFiles &&
|
||||
string.Equals(Path.GetDirectoryName(path), Path.GetDirectoryName(result.TargetPath), StringComparison.OrdinalIgnoreCase);
|
||||
string.Equals(_fileSystem.GetDirectoryName(path), _fileSystem.GetDirectoryName(result.TargetPath), StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (renameRelatedFiles)
|
||||
{
|
||||
@@ -432,7 +432,7 @@ namespace Emby.Server.Implementations.FileOrganization
|
||||
|
||||
// Now find other files
|
||||
var originalFilenameWithoutExtension = Path.GetFileNameWithoutExtension(path);
|
||||
var directory = Path.GetDirectoryName(path);
|
||||
var directory = _fileSystem.GetDirectoryName(path);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(originalFilenameWithoutExtension) && !string.IsNullOrWhiteSpace(directory))
|
||||
{
|
||||
@@ -445,7 +445,7 @@ namespace Emby.Server.Implementations.FileOrganization
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
directory = Path.GetDirectoryName(file);
|
||||
directory = _fileSystem.GetDirectoryName(file);
|
||||
var filename = Path.GetFileName(file);
|
||||
|
||||
filename = filename.Replace(originalFilenameWithoutExtension, targetFilenameWithoutExtension,
|
||||
@@ -499,7 +499,7 @@ namespace Emby.Server.Implementations.FileOrganization
|
||||
.Select(i => i.Path)
|
||||
.ToList();
|
||||
|
||||
var folder = Path.GetDirectoryName(targetPath);
|
||||
var folder = _fileSystem.GetDirectoryName(targetPath);
|
||||
var targetFileNameWithoutExtension = _fileSystem.GetFileNameWithoutExtension(targetPath);
|
||||
|
||||
try
|
||||
@@ -529,7 +529,7 @@ namespace Emby.Server.Implementations.FileOrganization
|
||||
|
||||
_libraryMonitor.ReportFileSystemChangeBeginning(result.TargetPath);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(result.TargetPath));
|
||||
_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(result.TargetPath));
|
||||
|
||||
var targetAlreadyExists = _fileSystem.FileExists(result.TargetPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user