Repository: foambubble/foam

Issue #923: Parentheses in full path name prevent loading notes on startup
Created: 2022-01-31T21:02:01Z
Foam version: v0.17.3
Platform: Mac
Issue occur on the foam template repo: Yes

Summary
When full path to repository contains parenthesis (e.g. My folder (1)), foam does not load the notes on start, which prevents link recognition, graph is empty, etc.
My best guess why that happens is that you use micromatch library here: 
  
    
      foam/packages/foam-vscode/src/core/services/datastore.ts
    
    
        Lines 79 to 87
      in
      17cb619
    
  
  
    

        
          
           const matches = micromatch( 
        

        
          
             files.map(f => f.toFsPath()), 
        

        
          
             this.include, 
        

        
          
             { 
        

        
          
               ignore: this.exclude, 
        

        
          
               nocase: true, 
        

        
          
               format: toFsPath, 
        

        
          
             } 
        

        
          
           ); 
        
    
  


.. and micromatch treats parentheses characters (( and )) in include globs and exclude globs specially: see extglobs. See logs below. So you probably need to escape them (and all other special characters) before using.
Why it's important? This bug prevents putting the foam folder into a Dropbox account that is paired with another Dropbox account. In this case, personal dropbox folder is named Dropbox (Personal) and there's no way to rename it.
Steps to reproduce
1.
mkdir "Test (1)"
cd "Test (1)"
git clone git@github.com:foambubble/foam-template.git


Open VS Code in that folder.
Observe no notes in graph.
Observe "[info - 3:48:29 PM] Loaded 0 notes" in the foam logs.

Additional information
Full log:
Foam Logging: info
[info - 3:48:28 PM] Starting Foam
[info - 3:48:28 PM] Workspace folders: 
[
  "/Users/ashtuchkin/Test (1)/foam-template"
]
[info - 3:48:28 PM] Glob patterns
{
  "includeGlobs": [
    "/Users/ashtuchkin/Test (1)/foam-template/**/*"
  ],
  "ignoreGlobs": [
    "/Users/ashtuchkin/Test (1)/foam-template/**/.vscode/**/*",
    "/Users/ashtuchkin/Test (1)/foam-template/**/_layouts/**/*",
    "/Users/ashtuchkin/Test (1)/foam-template/**/_site/**/*",
    "/Users/ashtuchkin/Test (1)/foam-template/**/node_modules/**/*",
    "/Users/ashtuchkin/Test (1)/foam-template/**/.git",
    "/Users/ashtuchkin/Test (1)/foam-template/**/.svn",
    "/Users/ashtuchkin/Test (1)/foam-template/**/.hg",
    "/Users/ashtuchkin/Test (1)/foam-template/**/CVS",
    "/Users/ashtuchkin/Test (1)/foam-template/**/.DS_Store",
    "/Users/ashtuchkin/Test (1)/foam-template/**/Thumbs.db",
    "/Users/ashtuchkin/Test (1)/foam-template/**/node_modules"
  ]
}
[info - 3:48:29 PM] Loaded 0 notes

Duplicate issue #1043: Foam backlink sidebar, graph, `cmd+click` broken when certain characters like `()` in path
Created: 2022-07-23T05:22:04Z
Describe the bug
Update a few things are broken when certain characters like () in path to the notes directory:

Foam backlink section in sidebar (empty)
Foam: Open Graph broken (it's empty)
cmd+click on link tries to create new note even if it exists already

Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue

download foam template and name it "test()"
open directory "test()" with foam
open backlinks section in side bar and confirm it doesn't show backlinks
open foam graph
repeat by cloning foam template and naming directory "test" without () characters

Expected behavior
As a user, I expected 3 features listed above to work.
Screenshots or Videos
No response
Operating System Version
Mac OS
Visual Studio Code Version
Version: 1.69.2 Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a
Additional context
I'm on Foam v0.19.1.

Closing comment (2022-07-26T15:36:52Z): duplicate of #923