RecycleDeletedFiles does not work on remote destination folder RRS feed

  • Question

  • Hi all,

    I am using MSF 2.1 to sync files from a client machine to a remote server. When a file on the client machine is deleted, I'd like the corresponding file on the server to be placed in the Recycle Bin, so we can restore it if needed. To achive that, I set the RecycleDeleted Files to the FileSyncOptions.

    During testing, if the destination server is on the same client machine, the function works correctly. The deleted file is moved to the Recycle Bin. However, if the change the destination folder to a shared folder on a remote server, that does not work. The deleted file is not in the Recycle Bin.

    Can anyone help me with this?

    FileSyncOptions options = FileSyncOptions.RecycleDeletedFiles | FileSyncOptions.CompareFileStreams | FileSyncOptions.RecyclePreviousFileOnUpdates | FileSyncOptions.RecycleConflictLoserFiles;

    FileSyncScopeFilter filter = new FileSyncScopeFilter(); filter.FileNameExcludes.Add("*.metadata");

    // Create file system provider FileSyncProvider sourceprovider = new FileSyncProvider(Guid.NewGuid(), sourceLrvDataPath, filter, options); FileSyncProvider destinationprovider = new FileSyncProvider(Guid.NewGuid(), destinationLrvDataPath, filter, options);

    soceprovider.Configuration.ConflictResolutionPolicy = ConflictResolutionPolicy.SourceWins; destinationprovider.Configuration.ConflictResolutionPolicy = ConflictResolutionPolicy.SourceWins;

    // Ask providers to detect changes sourceprovider.DetectChanges(); destinationprovider.DetectChanges();

    // Synchronization of 2 Folders sync = new SyncOrchestrator(); sync.LocalProvider = sourceprovider; sync.RemoteProvider = destinationprovider; sync.Direction = SyncDirectionOrder.Upload; sync.Synchronize();

    Thank you very much


    Tuesday, September 29, 2015 5:40 PM