]> git.lizzy.rs Git - go-fscache.git/blob - cache_windows.go
Replace obsolete lock package
[go-fscache.git] / cache_windows.go
1 package fscache
2
3 import (
4         "strings"
5 )
6
7 func filterDots(parts ...string) []string {
8         // no subdir
9         if len(parts) < 2 {
10                 return parts
11         }
12         filterDotsAll(parts[:len(parts)-1]...)
13         return parts
14 }
15
16 func filterDotsAll(parts ...string) []string {
17         for i := range parts {
18                 if parts[i][0] == '.' {
19                         parts[i] = strings.Replace(parts[i], ".", "_", 1)
20                 }
21         }
22         return parts
23 }