From 1c28345a19499bf82d72d88db7f7aaa14599c2f5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 19 Dec 2015 15:22:08 -0500 Subject: [PATCH] fix file deletion --- MediaBrowser.Server.Implementations/Sync/MediaSync.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Server.Implementations/Sync/MediaSync.cs b/MediaBrowser.Server.Implementations/Sync/MediaSync.cs index fd2f8ae8d..1a02fcd3a 100644 --- a/MediaBrowser.Server.Implementations/Sync/MediaSync.cs +++ b/MediaBrowser.Server.Implementations/Sync/MediaSync.cs @@ -66,7 +66,7 @@ namespace MediaBrowser.Server.Implementations.Sync // Do the data sync twice so the server knows what was removed from the device await SyncData(provider, dataProvider, serverId, target, cancellationToken).ConfigureAwait(false); - + progress.Report(100); } @@ -331,6 +331,9 @@ namespace MediaBrowser.Server.Implementations.Sync await provider.DeleteFile(file, target, cancellationToken).ConfigureAwait(false); } + _logger.Debug("Removing {0} from {1}.", localItem.FileId, target.Name); + await provider.DeleteFile(localItem.FileId, target, cancellationToken).ConfigureAwait(false); + await dataProvider.Delete(target, localItem.Id).ConfigureAwait(false); } }