rafaeljusto / toglacier

Periodic send data to the cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove disk letter from filename in tarball

rafaeljusto opened this issue · comments

In Windows, when creating the tarball, we are storing the filename with the disk letter.

A simple program to illustrate the bug:

package main

import (
	"fmt"
	"path/filepath"
)

func main() {
	fmt.Println(filepath.Join(`backup-dir`, `c:\important-dir\important-file`))
}

When running in Windows we get the output:

backup-dir\c:\important-dir\important-file

Where we wanted:

backup-dir\important-dir\important-file