Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
acc0d80c
Commit
acc0d80c
authored
Oct 26, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not add deletion entry for rename destination.
parent
7d4c2306
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
unionfs/memunionfs.go
unionfs/memunionfs.go
+7
-12
unionfs/memunionfs_test.go
unionfs/memunionfs_test.go
+0
-1
No files found.
unionfs/memunionfs.go
View file @
acc0d80c
...
...
@@ -93,7 +93,6 @@ func (me *MemUnionFs) Reap() map[string]*Result {
m
:=
map
[
string
]
*
Result
{}
for
name
,
_
:=
range
me
.
deleted
{
fi
,
code
:=
me
.
readonly
.
GetAttr
(
name
,
nil
)
if
!
code
.
Ok
()
{
continue
...
...
@@ -120,7 +119,7 @@ func (me *MemUnionFs) Reap() map[string]*Result {
}
}
me
.
root
.
R
eap
(
""
,
m
)
me
.
root
.
r
eap
(
""
,
m
)
return
m
}
...
...
@@ -379,14 +378,10 @@ func (me *memNode) Rename(oldName string, newParent fuse.FsNode, newName string,
me
.
fs
.
deleted
[
filepath
.
Join
(
me
.
original
,
oldName
)]
=
true
}
mn
:=
ch
.
FsNode
()
.
(
*
memNode
)
if
mn
.
original
!=
""
||
mn
==
me
.
fs
.
root
{
if
newParent
.
(
*
memNode
)
.
original
!=
""
{
me
.
fs
.
deleted
[
filepath
.
Join
(
newParent
.
(
*
memNode
)
.
original
,
newName
)]
=
true
}
mn
.
materialize
()
mn
.
markChanged
()
childNode
:=
ch
.
FsNode
()
.
(
*
memNode
)
if
childNode
.
original
!=
""
||
childNode
==
me
.
fs
.
root
{
childNode
.
materialize
()
childNode
.
markChanged
()
}
newParent
.
Inode
()
.
RmChild
(
newName
)
...
...
@@ -617,7 +612,7 @@ func (me *memNode) OpenDir(context *fuse.Context) (stream chan fuse.DirEntry, co
return
stream
,
fuse
.
OK
}
func
(
me
*
memNode
)
R
eap
(
path
string
,
results
map
[
string
]
*
Result
)
{
func
(
me
*
memNode
)
r
eap
(
path
string
,
results
map
[
string
]
*
Result
)
{
if
me
.
changed
{
info
:=
me
.
info
results
[
path
]
=
&
Result
{
...
...
@@ -630,7 +625,7 @@ func (me *memNode) Reap(path string, results map[string]*Result) {
for
n
,
ch
:=
range
me
.
Inode
()
.
FsChildren
()
{
p
:=
filepath
.
Join
(
path
,
n
)
ch
.
FsNode
()
.
(
*
memNode
)
.
R
eap
(
p
,
results
)
ch
.
FsNode
()
.
(
*
memNode
)
.
r
eap
(
p
,
results
)
}
}
...
...
unionfs/memunionfs_test.go
View file @
acc0d80c
...
...
@@ -883,7 +883,6 @@ func TestMemUnionResetDirEntry(t *testing.T) {
clearInodes
(
after
)
testEq
(
t
,
fuse
.
OsFileInfos
(
after
),
fuse
.
OsFileInfos
(
before
),
false
)
ufs
.
Reset
()
log
.
Println
(
"reseT"
)
reset
,
_
:=
ioutil
.
ReadDir
(
wd
+
"/mnt/dir"
)
clearInodes
(
reset
)
testEq
(
t
,
fuse
.
OsFileInfos
(
reset
),
fuse
.
OsFileInfos
(
before
),
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment