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

Local files suddenly gone! Where are local files stored? - URGENT #33

Open
MelodicCrypter opened this issue Jul 21, 2023 · 2 comments
Open

Comments

@MelodicCrypter
Copy link

All my local files were suddenly gone! Before I quit the app, it flickering/blinking. Then when I opened the app "Snip" again, all my local files were gone!

Is there a way I can restore them?

@marshallino16

@csyfcheng
Copy link

csyfcheng commented Jun 24, 2024

I encountered the very same situation. It flickering first, then I quit and reopen the app, all my snippets are gone.

@csyfcheng
Copy link

csyfcheng commented Jun 24, 2024

TLDR;
Location of Local Snip Snippets

If using the App Store version of the Snip app, your local snippets are stored at:

~/Library/Containers/com.pictarine.Snip/Data/Library/Application Support/Snip/snippets

For the downloaded version, the snippets are located at:

~/Library/Application Support/Snip/snippets

You can get your snippets back by reversing the snippet file to previous version using TimeMachine.


I managed to get my files back. I read the source code and found that the snippets are stored at ApplicationSupport.

// MARK: - Disk File Manager

extension SnippetManager {
  
  static func saveSnippets(on queue: DispatchQueue) -> ([SnipItem]) -> Void {
    return { snippets in
      queue.async {
        print("Saving snippets")
        StorageManager.store(snippets, to: .applicationSupport, as: "snippets")
      }
    }
    
  }
  

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

No branches or pull requests

2 participants