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
3ab41fc8
Commit
3ab41fc8
authored
May 06, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UnionFs: Update Mtime rather than Ctime in Utimens().
parent
abd479fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
unionfs/unionfs.go
unionfs/unionfs.go
+4
-4
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+1
-1
No files found.
unionfs/unionfs.go
View file @
3ab41fc8
...
...
@@ -346,7 +346,7 @@ func (me *UnionFs) Truncate(path string, offset uint64) (code fuse.Status) {
return
me
.
fileSystems
[
0
]
.
Truncate
(
path
,
offset
)
}
func
(
me
*
UnionFs
)
Utimens
(
name
string
,
atime
uint64
,
c
time
uint64
)
(
code
fuse
.
Status
)
{
func
(
me
*
UnionFs
)
Utimens
(
name
string
,
atime
uint64
,
m
time
uint64
)
(
code
fuse
.
Status
)
{
name
=
stripSlash
(
name
)
r
:=
me
.
getBranch
(
name
)
...
...
@@ -356,13 +356,13 @@ func (me *UnionFs) Utimens(name string, atime uint64, ctime uint64) (code fuse.S
r
.
branch
=
0
}
if
code
.
Ok
()
{
code
=
me
.
fileSystems
[
0
]
.
Utimens
(
name
,
atime
,
c
time
)
code
=
me
.
fileSystems
[
0
]
.
Utimens
(
name
,
atime
,
m
time
)
}
if
code
.
Ok
()
{
r
.
attr
.
Atime
=
uint64
(
atime
/
1e9
)
r
.
attr
.
Atimensec
=
uint32
(
atime
%
1e9
)
r
.
attr
.
Ctime
=
uint64
(
c
time
/
1e9
)
r
.
attr
.
Ctimensec
=
uint32
(
c
time
%
1e9
)
r
.
attr
.
Mtime
=
uint64
(
m
time
/
1e9
)
r
.
attr
.
Mtimensec
=
uint32
(
m
time
%
1e9
)
me
.
branchCache
.
Set
(
name
,
r
)
}
return
code
...
...
unionfs/unionfs_test.go
View file @
3ab41fc8
...
...
@@ -144,7 +144,7 @@ func TestChtimes(t *testing.T) {
CheckSuccess
(
err
)
fi
,
err
:=
os
.
Lstat
(
wd
+
"/mount/file"
)
if
fi
.
Atime_ns
!=
82e9
||
fi
.
C
time_ns
!=
83e9
{
if
fi
.
Atime_ns
!=
82e9
||
fi
.
M
time_ns
!=
83e9
{
t
.
Error
(
"Incorrect timestamp"
,
fi
)
}
}
...
...
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