Skip to content

Are absolute paths possible in workspace.ignoreDir? #3213

Answered by tomlau10
sewbacca asked this question in Q&A
Discussion options

You must be logged in to vote

The enhanced absolute path approach

library path matching

  • first check for prefix match
  • then to avoid a shorter folder name matching a longer one, requires either
    • library path ends with directory separator / or \
    • or the sub path after removing the prefix, starts with directory separator / or \

ignoreDir sub path extraction

  • after matching with a library path, first remove the library path prefix
  • then convert all \ to / so as to form a valid gitignore pattern
  • finally make sure that it is formatted with a leading /
    => because we want this pattern to start matching from the library path root

example usage

  • standard absolute path
{
    "workspace.library": [ "C:\\Users\\TomLau\\lib" ],
…

Replies: 2 comments 15 replies

Comment options

You must be logged in to vote
9 replies
@tomlau10
Comment options

@sewbacca
Comment options

@tomlau10
Comment options

@sewbacca
Comment options

@tomlau10
Comment options

Comment options

You must be logged in to vote
6 replies
@sewbacca
Comment options

@tomlau10
Comment options

@tomlau10
Comment options

Answer selected by sewbacca
@sewbacca
Comment options

@tomlau10
Comment options

@tomlau10
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants