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

Empty __browserfs_test__ indexedDB database is not deleted #317

Open
jcubic opened this issue Jul 31, 2021 · 3 comments
Open

Empty __browserfs_test__ indexedDB database is not deleted #317

jcubic opened this issue Jul 31, 2021 · 3 comments
Labels
Milestone

Comments

@jcubic
Copy link

jcubic commented Jul 31, 2021

If you use browserFS you end up with two indexedDB databases one is empty and it looks like debug code.
It's because of the code that tests if indexedDB is supported:

  public static isAvailable(): boolean {
    // In Safari's private browsing mode, indexedDB.open returns NULL.
    // In Firefox, it throws an exception.
    // In Chrome, it "just works", and clears the database when you leave the page.
    // Untested: Opera, IE.
    try {
      return typeof indexedDB !== 'undefined' && null !== indexedDB.open("__browserfs_test__");
    } catch (e) {
      return false;
    }
  }

The library should clean up after itself.

@james-pre
Copy link
Collaborator

@jcubic Is this error still around? If so I can take a look at having BrowserFS clean it up after checking that IndexedDB works.

@jcubic
Copy link
Author

jcubic commented Mar 10, 2023

I will test if the debug database is still there. I will need to check the latest version, will try when I found some free time, maybe on the weekend.

@james-pre james-pre self-assigned this Apr 28, 2023
@james-pre james-pre added bug and removed enhancement labels Sep 15, 2023
@james-pre james-pre added this to the 2.0 milestone Sep 15, 2023
@james-pre james-pre changed the title BrowserFS create empty __browserfs_test__ indexedDB database BrowserFS doesn't delete empty __browserfs_test__ indexedDB database Sep 15, 2023
@james-pre james-pre changed the title BrowserFS doesn't delete empty __browserfs_test__ indexedDB database Empty __browserfs_test__ indexedDB database is not deleted Sep 15, 2023
@james-pre james-pre changed the title Empty __browserfs_test__ indexedDB database is not deleted Empty __browserfs_test__ indexedDB database is not deleted Oct 25, 2023
@james-pre
Copy link
Collaborator

james-pre commented Oct 25, 2023

Please use zen-fs/core#21

@james-pre james-pre closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
Repository owner locked and limited conversation to collaborators Oct 25, 2023
Repository owner unlocked this conversation May 17, 2024
@james-pre james-pre reopened this May 17, 2024
@james-pre james-pre removed their assignment Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants