mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-12-23 13:04:42 +00:00
Compare commits
1 Commits
v0.4.9
...
v0.4.4-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a106abc8ba |
@@ -431,7 +431,9 @@ func AddFile(ar archiver.Writer, path, commonPath string) error {
|
|||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
if path != commonPath {
|
if path != commonPath {
|
||||||
filename := info.Name()
|
//filename := info.Name()
|
||||||
|
filename := strings.TrimPrefix(path, commonPath)
|
||||||
|
filename = strings.TrimPrefix(filename, string(filepath.Separator))
|
||||||
err = ar.Write(archiver.File{
|
err = ar.Write(archiver.File{
|
||||||
FileInfo: archiver.FileInfo{
|
FileInfo: archiver.FileInfo{
|
||||||
FileInfo: info,
|
FileInfo: info,
|
||||||
|
|||||||
Reference in New Issue
Block a user