mirror of
https://github.com/rclone/rclone.git
synced 2024-12-26 00:49:22 +01:00
smb: fix issue where spurious dot directory is created
This commit is contained in:
parent
959cd938bc
commit
7db1c506f2
@ -478,11 +478,15 @@ func (f *Fs) makeEntryRelative(share, _path, relative string, stat os.FileInfo)
|
||||
}
|
||||
|
||||
func (f *Fs) ensureDirectory(ctx context.Context, share, _path string) error {
|
||||
dir := path.Dir(_path)
|
||||
if dir == "." {
|
||||
return nil
|
||||
}
|
||||
cn, err := f.getConnection(ctx, share)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = cn.smbShare.MkdirAll(f.toSambaPath(path.Dir(_path)), 0o755)
|
||||
err = cn.smbShare.MkdirAll(f.toSambaPath(dir), 0o755)
|
||||
f.putConnection(&cn)
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user