locked
StorageDataSoure does not react on deletion of files RRS feed

  • Question

  • This seems to be broken. It adds files that are copied to a watched folder but does not remove items, that are deleted in that folder. With that limitation the data source is basically useless as it cannot represent the current state of the watched folder.

    I guess this limitation comes from the fact that the "contentchanged" event does not tell the listener *what* actually has changed and the datasource does not bother to diff the previous files with the new set of files in the folder.

    Tuesday, March 5, 2013 5:08 PM

Answers

  • Hi Phil,

    With the repro app you provided, I am seeing the right behavior. Here is what I have done:

    1.) Created 5 files in the folder: C:\Users\<username>\AppData\Local\Packages\StorageDataSourceTest_pb2vwyt99byzj\LocalState

    2.) Ran your app which shows the 5 files

    3.) Deleted 3 files from the folder

    4.) Switch back to the app and see the remaining 2 files being listed.

    This happens even when I put the app in the background, delete the files and then bring back the app to the foreground, so unfortunately this is a "no repro" unless you have more specific steps to reproduce the issue.

    Thanks,

    Prashant.

    • Marked as answer by Song Tian Monday, March 11, 2013 10:01 AM
    Thursday, March 7, 2013 8:22 PM
    Moderator

All replies

  • Do you have a repro of the scenario you are describing?

    Wednesday, March 6, 2013 12:56 AM
    Moderator

  • sure http://sdrv.ms/WullTC

    Simply put some files in the apps local folder and see them appear. Then delete some files in that folder and see... them not disappear. Only when you copy a new file into the folder again, the deleted files will disappear from the listview. 

    Wednesday, March 6, 2013 10:36 AM
  • Hi Phil,

    With the repro app you provided, I am seeing the right behavior. Here is what I have done:

    1.) Created 5 files in the folder: C:\Users\<username>\AppData\Local\Packages\StorageDataSourceTest_pb2vwyt99byzj\LocalState

    2.) Ran your app which shows the 5 files

    3.) Deleted 3 files from the folder

    4.) Switch back to the app and see the remaining 2 files being listed.

    This happens even when I put the app in the background, delete the files and then bring back the app to the foreground, so unfortunately this is a "no repro" unless you have more specific steps to reproduce the issue.

    Thanks,

    Prashant.

    • Marked as answer by Song Tian Monday, March 11, 2013 10:01 AM
    Thursday, March 7, 2013 8:22 PM
    Moderator
  • Thanks for your answer. I am on a multi-monitor setup here. VS running on the secondary monitor and the app on the primary. Deleting files from the filesystem that are displayed in the app do not result in a proper refresh. Maybe switching from and to the app triggers other change notifications on resume. But on a multi-mon setup the app is behaving wrong, as described in my first posting. Maybe you could try again with such setup?
    Monday, March 11, 2013 10:55 AM
  • I have tried/tested your project on a multi-monitor as well as putting the app in the background. The issue is not reproducible issue either way.

    Monday, March 11, 2013 4:49 PM
    Moderator
  • Ok, so I tried again. There are moments when the deletion detection is lagging behind and sometimes still does not remove all items from the list view. I try to record a video of that.
    Tuesday, March 12, 2013 10:54 AM