Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Subdirectory handling for horizon fixes #72
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lucas <[email protected]>
  • Loading branch information
Xavier Lucas committed Jun 16, 2016
1 parent 7bf6ca8 commit 0d6c7c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions svfs/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (d *Directory) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *f
// Mkdir creates a new directory node within the current directory. It is represented
// by an empty object ending with a slash in the Swift container.
func (d *Directory) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error) {
absPath := d.path + req.Name
absPath := d.path + req.Name + "/"

// Create the file in swift
if err := SwiftConnection.ObjectPutBytes(d.c.Name, absPath, nil, dirContentType); err != nil {
Expand All @@ -261,7 +261,7 @@ func (d *Directory) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node,
c: d.c,
cs: d.cs,
name: req.Name,
path: absPath + "/",
path: absPath,
sh: swift.Headers{},
so: &swift.Object{
Name: absPath,
Expand Down

0 comments on commit 0d6c7c5

Please sign in to comment.