From 2b991c9743caa5edf38fbcdadb129ca61ffa702f Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 1 Nov 2016 18:43:22 +0100 Subject: Add support for unpadded base64 filenames, "-raw64" Through base64.RawURLEncoding. New command-line parameter "-raw64". --- internal/fusefrontend/args.go | 3 +++ internal/fusefrontend/fs.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'internal/fusefrontend') diff --git a/internal/fusefrontend/args.go b/internal/fusefrontend/args.go index 204647d..d8b0304 100644 --- a/internal/fusefrontend/args.go +++ b/internal/fusefrontend/args.go @@ -18,4 +18,7 @@ type Args struct { // location. If it is false, reverse mode maps ".gocryptfs.reverse.conf" // to "gocryptfs.conf" in the plaintext dir. ConfigCustom bool + // Raw64 is true when RawURLEncoding (without padding) should be used for + // file names + Raw64 bool } diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index 33053de..e9e6113 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -42,7 +42,7 @@ var _ pathfs.FileSystem = &FS{} // Verify that interface is implemented. func NewFS(args Args) *FS { cryptoCore := cryptocore.New(args.Masterkey, args.CryptoBackend, contentenc.DefaultIVBits) contentEnc := contentenc.New(cryptoCore, contentenc.DefaultBS) - nameTransform := nametransform.New(cryptoCore, args.LongNames) + nameTransform := nametransform.New(cryptoCore, args.LongNames, args.Raw64) return &FS{ FileSystem: pathfs.NewLoopbackFileSystem(args.Cipherdir), -- cgit v1.2.3