导入 Sensenet 时出现 Path Too Long 错误
Path Too Long Error when importing into Sensenet
我也在尝试将一些内容导入 Sensenet,但它引发了以下错误:
14:12:12.4025 ========== Exception:
14:12:12.4155 Path: C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
14:12:12.4315 ApplicationException: Cannot create a ContentInfo. Path: C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
14:12:12.5955 at SenseNet.Packaging.Steps.ImportBase.ContentInfo..ctor(String path, Node parent)
at SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
14:12:12.6115 PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
14:12:12.6625 at System.IO.Path.NewNormalizePathLimitedChecks(String path, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at SenseNet.Packaging.Steps.ImportBase.ContentInfo..ctor(String path, Node parent)
14:12:12.6885 =====================
我更改了注册表和组策略以启用对长文件名的支持,但错误仍然出现。
我是否需要更改某些 Sensenet 配置文件才能使其正常工作?
谢谢
Windows 对文件路径有 256 个字符的限制,并且不能超过这个限制。随着更新 Windows 10 删除了此限制,但不能保证像 snadmin 这样的旧版软件可以使用它。参见 Maximum Path Length Limitation
另一种缩短工具入口点的解决方法,例如来自
C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
至
C:\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
要实现此相对或绝对路径,可以使用 snadmin,参见 Arguments
对于上面的例子,我假设它会是这样的:
SnAdmin.exe 'C:\tools\import_legacy_content.zip'
我也在尝试将一些内容导入 Sensenet,但它引发了以下错误:
14:12:12.4025 ========== Exception:
14:12:12.4155 Path: C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
14:12:12.4315 ApplicationException: Cannot create a ContentInfo. Path: C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
14:12:12.5955 at SenseNet.Packaging.Steps.ImportBase.ContentInfo..ctor(String path, Node parent)
at SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
14:12:12.6115 PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
14:12:12.6625 at System.IO.Path.NewNormalizePathLimitedChecks(String path, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at SenseNet.Packaging.Steps.ImportBase.ContentInfo..ctor(String path, Node parent)
14:12:12.6885 =====================
我更改了注册表和组策略以启用对长文件名的支持,但错误仍然出现。 我是否需要更改某些 Sensenet 配置文件才能使其正常工作?
谢谢
Windows 对文件路径有 256 个字符的限制,并且不能超过这个限制。随着更新 Windows 10 删除了此限制,但不能保证像 snadmin 这样的旧版软件可以使用它。参见 Maximum Path Length Limitation
另一种缩短工具入口点的解决方法,例如来自
C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
至
C:\tools\import_legacy_content\content\workspaces2\IPA2013\Framework WorkspacesSER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
要实现此相对或绝对路径,可以使用 snadmin,参见 Arguments
对于上面的例子,我假设它会是这样的:
SnAdmin.exe 'C:\tools\import_legacy_content.zip'