Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants