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

No such file or directory问题,脚本匹配文件或文件夹的某些字符时会出错,需要手动排除,再手动硬链接这些文件 #189

Open
up55 opened this issue Sep 30, 2024 · 3 comments

Comments

@up55
Copy link

up55 commented Sep 30, 2024

目前发现文件或文件夹中有', .part, .parts, .partial的文件时会出错No such file or directory
解决方法,手动排除这些文件,参考配置如下

    exclude: {
      globs: ['**/*\'*/**', '**/*\'*'], 
      exts: [
        'partial',
        'parts',
        'part'
      ]
    }

错误信息:

Command failed with exit code 1: ln C:\d\lib\downloads\影视\电影\Ghibli.Anime.Collection.1979-2013.BluRay.1080p.x264.DTS.AC3-HDWinG\Howl's.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG\Howl's.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG.mkv C:\d\lib\library\影视\电影\Ghibli.Anime.Collection.1979-2013.BluRay.1080p.x264.DTS.AC3-HDWinG\Howl's.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG
ln: failed to access 'C:\d\lib\downloads\影视\电影\Ghibli.Anime.Collection.1979-2013.BluRay.1080p.x264.DTS.AC3-HDWinG\Howls.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG\Howls.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG.mkv': No such file or directory
Error: Command failed with exit code 1: ln C:\d\lib\downloads\影视\电影\Ghibli.Anime.Collection.1979-2013.BluRay.1080p.x264.DTS.AC3-HDWinG\Howl's.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG\Howl's.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG.mkv C:\d\lib\library\影视\电影\Ghibli.Anime.Collection.1979-2013.BluRay.1080p.x264.DTS.AC3-HDWinG\Howl's.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG
ln: failed to access 'C:\d\lib\downloads\影视\电影\Ghibli.Anime.Collection.1979-2013.BluRay.1080p.x264.DTS.AC3-HDWinG\Howls.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG\Howls.Moving.Castle.2004.BluRay.1080p.x264.DTS.AC3.4Audio-HDWinG.mkv': No such file or directory
@up55
Copy link
Author

up55 commented Sep 30, 2024

windows手动硬链接工具推荐:HardLinkShellExt
官网:https://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

@guoyuejiang
Copy link

你用的是windows么?单引号,我改了link.js的一行代码好像解决了,应该是字符串里的单引号被吃掉了
await execa(ln "${sourceFile}" "${originalDestPath}");

@up55
Copy link
Author

up55 commented Oct 10, 2024

你用的是windows么?单引号,我改了link.js的一行代码好像解决了,应该是字符串里的单引号被吃掉了 await execa(ln "${sourceFile}" "${originalDestPath}");

兄弟,你的 ` 也被吃掉了,你代码里的 ` 和markdown语法冲突了,我还寻思你语法咋错了呢,试了半天,又想估计是execa函数转义了字符,试了半天还是不行,点一下回复才发现你的原代码是await execa(`ln "${sourceFile}" "${originalDestPath}"`);,今天算是被转义给坑惨了。。。。
最后用你的代码没问题了,感谢!

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

2 participants