Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error for deleted files in "Open Recent" #281

Open
scholtzan opened this issue Oct 2, 2018 · 3 comments
Open

Error for deleted files in "Open Recent" #281

scholtzan opened this issue Oct 2, 2018 · 3 comments

Comments

@scholtzan
Copy link
Member

scholtzan commented Oct 2, 2018

If a previously opened file gets deleted, then xi mac prints the following error on startup when trying to add the file to "Open Recent":

2018-10-02 09:01:55.161649-0700 XiEditor[53225:1802279] [default] Failed to updated bookmark for item (null) [CFBFD760-28E1-4D5D-91C0-41B6262D0BED] - URL:file:///path/to/deleted/file.txt with error Error 

Also, the entry for deleted files still exists in "Open Recent" but is empty (no file name). I think it would be better to not have entries for deleted files?

@jkaan
Copy link

jkaan commented Oct 2, 2018

@cmyr I would like to start with this one, probably this is a good one to get started with and later I can pick up #275

@mmatoszko
Copy link
Member

mmatoszko commented Dec 5, 2018

I did some digging and this is not as straighforward as it seems :)

Recent documents functionality is provided out of the box by NSDocumentController.

It is possible to get the recent documents list using recentDocumentURLs property on NSDocumentController, so we could in theory write our own implementation of the list using this property and filter out the non-existent files.

It seems like an easy task to do, but considering the fact that we're going to remove NSDocument in the near future (see #290) I'm not sure it's worth the effort.

@cmyr
Copy link
Member

cmyr commented Dec 6, 2018

What surprises me here is that NSDocument doesn't handle the filtering of non-existent files; I sort of suspect that it does by default (this should be easy to test?) but maybe we're disabling it somehow?

In any case, I agree it doesn't make much sense to do a bunch of work on this if we're going to throw it away. That said, maybe it's worth starting a list somewhere of the various features we're going to need to reimplement when we do move off of NSDocument?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@scholtzan @mmatoszko @cmyr @jkaan and others