Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ds-flatfs
Commits
4b8d6261
Commit
4b8d6261
authored
Jan 26, 2017
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use filepath, not path
parent
448e8974
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
flatfs.go
flatfs.go
+3
-4
No files found.
flatfs.go
View file @
4b8d6261
...
...
@@ -8,7 +8,6 @@ import (
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"time"
...
...
@@ -118,13 +117,13 @@ func (fs *Datastore) ShardStr() string {
func
(
fs
*
Datastore
)
encode
(
key
datastore
.
Key
)
(
dir
,
file
string
)
{
noslash
:=
key
.
String
()[
1
:
]
dir
=
path
.
Join
(
fs
.
path
,
fs
.
getDir
(
noslash
))
file
=
path
.
Join
(
dir
,
noslash
+
extension
)
dir
=
file
path
.
Join
(
fs
.
path
,
fs
.
getDir
(
noslash
))
file
=
file
path
.
Join
(
dir
,
noslash
+
extension
)
return
dir
,
file
}
func
(
fs
*
Datastore
)
decode
(
file
string
)
(
key
datastore
.
Key
,
ok
bool
)
{
if
path
.
Ext
(
file
)
!=
extension
{
if
file
path
.
Ext
(
file
)
!=
extension
{
return
datastore
.
Key
{},
false
}
name
:=
file
[
:
len
(
file
)
-
len
(
extension
)]
...
...
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