mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-28 04:46:58 -04:00
more test-fixture
This commit is contained in:
committed by
Pierre Dubouilh
parent
2f73fd9df8
commit
5440b4c5a2
@@ -40,3 +40,7 @@ test-fixture/*/*
|
||||
!test-fixture/fancy-path/*
|
||||
!test-fixture/ext/*
|
||||
!test-fixture/ext
|
||||
!test-fixture/.some-hidden-file
|
||||
!test-fixture/hols/.hidden-folder
|
||||
!test-fixture/hols/.hidden-folder/some-file
|
||||
!test-fixture/compress/hols-sym
|
||||
|
||||
@@ -244,8 +244,8 @@ func checkPath(p string) string {
|
||||
|
||||
// panic if we had a error getting absolute path,
|
||||
// ... or if path doesnt contain the prefix path we expect,
|
||||
// ... or if we skipping hidden folders, and one is requested,
|
||||
// ... or if we enable symlinks - but it resolves out of our predefined path.
|
||||
// ... or if we're skipping hidden folders, and one is requested,
|
||||
// ... or if we're skipping symlinks - and one resolves out of our predefined path.
|
||||
if err != nil || !strings.HasPrefix(fp, initPath) || *skipHidden && strings.Contains(p, "/.") || !*symlinks && len(sl) > 0 && !strings.HasPrefix(sl, initPath) {
|
||||
panic(errors.New("invalid path"))
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
hidden !
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../hols
|
||||
@@ -0,0 +1 @@
|
||||
I'm hidden by my directory!
|
||||
Reference in New Issue
Block a user