Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

下载路径设置的是D:\Downloads,但是下载文件的时候会自动在D:\Downloads下又创建一个我网盘用户名的文件夹 #326

Open
34Hz-com opened this issue Apr 1, 2024 · 3 comments

Comments

@34Hz-com
Copy link

34Hz-com commented Apr 1, 2024

下载路径设置的是D:\Downloads,但是下载文件的时候会自动在D:\Downloads下又创建一个我网盘用户名的文件夹,文件就在这个我用户名的文件夹内,如何能不创建这个文件夹呢

@pongfcnkl
Copy link

pongfcnkl commented Apr 15, 2024

正常,除非修改源代码
应该是这一行

func (baidu *Baidu) GetSavePath(pcspath string) string {

@RayPS
Copy link

RayPS commented Apr 29, 2024

遇到了同样的问题,貌似不是 Bug。savedir 这个选项有点形同虚设的感觉...
目前解决方法是把这行:

dirStr := filepath.Join(Config.SaveDir, fmt.Sprintf("%d_%s", baidu.UID, converter.TrimPathInvalidChars(baidu.Name)), pcspath)

改成:

dirStr := filepath.Join(Config.SaveDir, pcspath)

然后把这行删掉:

"github.com/qjfoidnh/BaiduPCS-Go/pcsutil/converter"

重新编译就可以了,从此一劳永逸,不需要再每次都自己移动一下文件了

@qjfoidnh
Copy link
Owner

savedir不支持完全自定义路径,完全自定义可通过下载时添加--saveto指定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants