gpt4 book ai didi

node.js - 如何在 Windows 7 中删除 git 本地存储库文件夹

转载 作者:太空宇宙 更新时间:2023-11-04 01:04:27 25 4
gpt4 key购买 nike

我已经在本地目录中创建了 git clone 。然后我运行了 npm 并安装了一些 Node 包(gulp 等)。但我现在不想要工作目录。所以我只是右键单击并删除,我无法删除。我收到以下错误。

"The source file name(s) are larger than is supported by the file system. Try moving to a location which has shorter path name, or try renaming to shorted name(s) before attempting this operation"

会出现什么问题。

最佳答案

在 Windows 上,this thread表明它可以是:

  • 路径长度问题(路径太长)
  • 进程问题(保留正在删除的文件之一的句柄)

I found out make a drive mapping about halfway into the folder structure you should be able to delete the latter half of the file heirarcy.

For example if you are getting the error trying to delete:

\\NAS.Device.Company.com\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z

Then map a network drive Z: to

\\NAS.Device.Company.com\a\b\c\d\e\f\g\h\i\j\k\

This will reduce the file herarchy down to a smaller path.
Open explorer and view the Z: drive. It should contain a folder called L (in this example).

You should now be able to delete the L and its subfolders without an issue, thereby deleting half the folder hierarchy.
After that, disconnect the Z: drive and try to delete whatever is left normally.
Problem solved!

关于node.js - 如何在 Windows 7 中删除 git 本地存储库文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24444879/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com