locked
BackgroundFileTransfer breaks if file in download is deleted from disk before download finishs

    Question

  • How do I prevent the user from deleting a file that is currently being downloaded?

    I am using

    return WinJS.Application.local.folder.createFileAsync(localFile, Windows.Storage.CreationCollisionOption.generateUniqueName).then(function (newFile) {
         var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();
         var operation = downloader.createDownload(uri, newFile);

    To create the file. However, the file can be deleted by everybody and once the download finished it cannot write the file and raises an error.

    I would have thought that the BFT API makes sure the target file cannot be tempered with while the download is ongoing.

    Tuesday, October 02, 2012 3:30 PM

All replies

  • Anybody from MSFT? This behaviour is unexpected, isn't it?
    Tuesday, November 27, 2012 10:11 AM