This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
openFile creates a file if not exist => ErrNotExist is not possible
pull/2799/head
Anton Kaliaev
6 years ago
parent
d178ea9eaf
commit
091d2c3e5e
1 changed files
with
1 additions
and
5 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-5
libs/autofile/autofile.go
+ 1
- 5
libs/autofile/autofile.go
View File
@ -176,11 +176,7 @@ func (af *AutoFile) Size() (int64, error) {
defer
af
.
mtx
.
Unlock
(
)
defer
af
.
mtx
.
Unlock
(
)
if
af
.
file
==
nil
{
if
af
.
file
==
nil
{
err
:=
af
.
openFile
(
)
if
err
!=
nil
{
if
err
==
os
.
ErrNotExist
{
return
0
,
nil
}
if
err
:=
af
.
openFile
(
)
;
err
!=
nil
{
return
-
1
,
err
return
-
1
,
err
}
}
}
}
Write
Preview
Loading…
Cancel
Save