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-dms3
Commits
a97639a7
Commit
a97639a7
authored
Aug 13, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dont create ipnsfs filesystem until its needed
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
0f906596
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
core/core.go
core/core.go
+0
-10
fuse/ipns/mount_unix.go
fuse/ipns/mount_unix.go
+9
-0
No files found.
core/core.go
View file @
a97639a7
...
...
@@ -38,7 +38,6 @@ import (
routing
"github.com/ipfs/go-ipfs/routing"
dht
"github.com/ipfs/go-ipfs/routing/dht"
kb
"github.com/ipfs/go-ipfs/routing/kbucket"
nilrouting
"github.com/ipfs/go-ipfs/routing/none"
offroute
"github.com/ipfs/go-ipfs/routing/offline"
...
...
@@ -162,15 +161,6 @@ func NewIPFSNode(ctx context.Context, option ConfigOption) (*IpfsNode, error) {
}
node
.
Resolver
=
&
path
.
Resolver
{
DAG
:
node
.
DAG
}
// Setup the mutable ipns filesystem structure
if
node
.
OnlineMode
()
{
fs
,
err
:=
ipnsfs
.
NewFilesystem
(
ctx
,
node
.
DAG
,
node
.
Namesys
,
node
.
Pinning
,
node
.
PrivateKey
)
if
err
!=
nil
&&
err
!=
kb
.
ErrLookupFailure
{
return
nil
,
err
}
node
.
IpnsFs
=
fs
}
success
=
true
return
node
,
nil
}
...
...
fuse/ipns/mount_unix.go
View file @
a97639a7
...
...
@@ -6,6 +6,7 @@ package ipns
import
(
core
"github.com/ipfs/go-ipfs/core"
mount
"github.com/ipfs/go-ipfs/fuse/mount"
ipnsfs
"github.com/ipfs/go-ipfs/ipnsfs"
)
// Mount mounts ipns at a given location, and returns a mount.Mount instance.
...
...
@@ -13,6 +14,14 @@ func Mount(ipfs *core.IpfsNode, ipnsmp, ipfsmp string) (mount.Mount, error) {
cfg
:=
ipfs
.
Repo
.
Config
()
allow_other
:=
cfg
.
Mounts
.
FuseAllowOther
if
ipfs
.
IpnsFs
==
nil
{
fs
,
err
:=
ipnsfs
.
NewFilesystem
(
ipfs
.
Context
(),
ipfs
.
DAG
,
ipfs
.
Namesys
,
ipfs
.
Pinning
,
ipfs
.
PrivateKey
)
if
err
!=
nil
{
return
nil
,
err
}
ipfs
.
IpnsFs
=
fs
}
fsys
,
err
:=
NewFileSystem
(
ipfs
,
ipfs
.
PrivateKey
,
ipfsmp
,
ipnsmp
)
if
err
!=
nil
{
return
nil
,
err
...
...
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