Commit 2b9f0042 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Rename zipfs ctor to NewZipArchiveFileSystem.

parent 5db91988
...@@ -43,7 +43,7 @@ func (me *zipCreateFile) Write(input *fuse.WriteIn, nameBytes []byte) (uint32, f ...@@ -43,7 +43,7 @@ func (me *zipCreateFile) Write(input *fuse.WriteIn, nameBytes []byte) (uint32, f
zipFile := string(nameBytes) zipFile := string(nameBytes)
zipFile = strings.Trim(zipFile, "\n ") zipFile = strings.Trim(zipFile, "\n ")
fs := NewZipFileFuse(zipFile) fs := NewZipArchiveFileSystem(zipFile)
if fs == nil { if fs == nil {
// TODO // TODO
log.Println("NewZipFileFuse returned nil") log.Println("NewZipFileFuse returned nil")
......
...@@ -101,7 +101,7 @@ func zipFilesToTree(files []*zip.File) *ZipDirTree { ...@@ -101,7 +101,7 @@ func zipFilesToTree(files []*zip.File) *ZipDirTree {
} }
func NewZipFileFuse(name string) *ZipFileFuse { func NewZipArchiveFileSystem(name string) *ZipFileFuse {
z := new(ZipFileFuse) z := new(ZipFileFuse)
r, err := zip.OpenReader(name) r, err := zip.OpenReader(name)
if err != nil { if err != nil {
...@@ -129,6 +129,7 @@ func (me *ZipFileFuse) GetAttr(name string) (*fuse.Attr, fuse.Status) { ...@@ -129,6 +129,7 @@ func (me *ZipFileFuse) GetAttr(name string) (*fuse.Attr, fuse.Status) {
if file == nil { if file == nil {
a.Mode = zip_DIRMODE a.Mode = zip_DIRMODE
} else { } else {
// TODO - do something intelligent with timestamps.
a.Mode = zip_FILEMODE a.Mode = zip_FILEMODE
a.Size = uint64(file.UncompressedSize) a.Size = uint64(file.UncompressedSize)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment