mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-16 07:06:18 +00:00
add smb fixes
This commit is contained in:
@@ -126,7 +126,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
Logger.Info("Saving system configuration");
|
||||
var path = CommonApplicationPaths.SystemConfigurationFilePath;
|
||||
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(path));
|
||||
|
||||
lock (_configurationSyncLock)
|
||||
{
|
||||
@@ -293,7 +293,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
_configurations.AddOrUpdate(key, configuration, (k, v) => configuration);
|
||||
|
||||
var path = GetConfigurationFile(key);
|
||||
FileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
FileSystem.CreateDirectory(FileSystem.GetDirectoryName(path));
|
||||
|
||||
lock (_configurationSyncLock)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
// If the file didn't exist before, or if something has changed, re-save
|
||||
if (buffer == null || !buffer.SequenceEqual(newBytes))
|
||||
{
|
||||
fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
fileSystem.CreateDirectory(fileSystem.GetDirectoryName(path));
|
||||
|
||||
// Save it after load in case we got new items
|
||||
fileSystem.WriteAllBytes(path, newBytes);
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace Emby.Server.Implementations.Devices
|
||||
|
||||
_libraryMonitor.ReportFileSystemChangeBeginning(path);
|
||||
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path));
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Emby.Server.Implementations.Devices
|
||||
public Task SaveDevice(DeviceInfo device)
|
||||
{
|
||||
var path = Path.Combine(GetDevicePath(device.Id), "device.json");
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path));
|
||||
|
||||
lock (_syncLock)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ namespace Emby.Server.Implementations.Devices
|
||||
public void AddCameraUpload(string deviceId, LocalFileInfo file)
|
||||
{
|
||||
var path = Path.Combine(GetDevicePath(deviceId), "camerauploads.json");
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path));
|
||||
|
||||
lock (_syncLock)
|
||||
{
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Emby.Server.Implementations.FFMpeg
|
||||
else
|
||||
{
|
||||
info = existingVersion;
|
||||
versionedDirectoryPath = Path.GetDirectoryName(info.EncoderPath);
|
||||
versionedDirectoryPath = _fileSystem.GetDirectoryName(info.EncoderPath);
|
||||
excludeFromDeletions.Add(versionedDirectoryPath);
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ namespace Emby.Server.Implementations.FFMpeg
|
||||
{
|
||||
EncoderPath = encoder,
|
||||
ProbePath = probe,
|
||||
Version = Path.GetFileName(Path.GetDirectoryName(probe))
|
||||
Version = Path.GetFileName(_fileSystem.GetDirectoryName(probe))
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1197,6 +1197,7 @@ namespace Emby.Server.Implementations.Library
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
_logger.Info("Post-scan task cancelled: {0}", task.GetType().Name);
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Don't clutter the log
|
||||
break;
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Don't clutter the log
|
||||
break;
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Don't clutter the log
|
||||
break;
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Don't clutter the log
|
||||
break;
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Don't clutter the log
|
||||
break;
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
|
||||
while (yearNumber < maxYear)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
try
|
||||
{
|
||||
var year = _libraryManager.GetYear(yearNumber);
|
||||
@@ -35,7 +37,7 @@ namespace Emby.Server.Implementations.Library.Validators
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Don't clutter the log
|
||||
break;
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user