-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: fix Open issue with single-item relative paths
Previously Open with a relative path containing a single element would fail on real filesystems, because Open would attempt to open the empty path. Fix #3842.
- Loading branch information
Showing
8 changed files
with
159 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
mkfs memfs fs=mem1 | ||
---- | ||
new memfs | ||
|
||
mkdir-all-and-sync-parents fs=mem1 path=foo/bar/baz/bax | ||
---- | ||
mkdir-all: foo/bar/baz/bax 0755 | ||
open-dir: foo/bar/baz | ||
sync: foo/bar/baz | ||
close: foo/bar/baz | ||
open-dir: foo/bar | ||
sync: foo/bar | ||
close: foo/bar | ||
open-dir: foo | ||
sync: foo | ||
close: foo | ||
open-dir: . | ||
sync: . | ||
close: . | ||
open-dir: foo/bar/baz/bax | ||
close: foo/bar/baz/bax | ||
|
||
# Repeating the same command should only sync the parent, and then the new data | ||
# directory itself. | ||
|
||
mkdir-all-and-sync-parents fs=mem1 path=foo/bar/baz/bax | ||
---- | ||
mkdir-all: foo/bar/baz/bax 0755 | ||
open-dir: foo/bar/baz | ||
sync: foo/bar/baz | ||
close: foo/bar/baz | ||
open-dir: foo/bar/baz/bax | ||
close: foo/bar/baz/bax | ||
|
||
mkfs fs=default1 | ||
---- | ||
new default fs | ||
|
||
mkdir-all-and-sync-parents fs=default1 path=foo/bar/baz/bax | ||
---- | ||
mkdir-all: foo/bar/baz/bax 0755 | ||
open-dir: foo/bar/baz | ||
sync: foo/bar/baz | ||
close: foo/bar/baz | ||
open-dir: foo/bar | ||
sync: foo/bar | ||
close: foo/bar | ||
open-dir: foo | ||
sync: foo | ||
close: foo | ||
open-dir: . | ||
sync: . | ||
close: . | ||
open-dir: foo/bar/baz/bax | ||
close: foo/bar/baz/bax | ||
|
||
# Repeating the same command should only sync the parent, and then the new data | ||
# directory itself. | ||
|
||
mkdir-all-and-sync-parents fs=default1 path=foo/bar/baz/bax | ||
---- | ||
mkdir-all: foo/bar/baz/bax 0755 | ||
open-dir: foo/bar/baz | ||
sync: foo/bar/baz | ||
close: foo/bar/baz | ||
open-dir: foo/bar/baz/bax | ||
close: foo/bar/baz/bax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters