Skip to content

Needs to be migrated to newer .NET Framework version to support Long File Names #61

@GeyserLaPunk

Description

@GeyserLaPunk

Needs to be migrated to newer .NET Framework version to support Long File Names.

Throws following error if path or name is too long:

ERROR: 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.
System.IO.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.
   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 Hpdi.Vss2Git.GitExporter.WriteStream(Stream inputStream, String path)
   at Hpdi.Vss2Git.GitExporter.WriteRevisionTo(String physical, Int32 version, String destPath)
   at Hpdi.Vss2Git.GitExporter.ReplayRevision(VssPathMapper pathMapper, Revision revision, GitWrapper git, LinkedList`1 labels)
   at Hpdi.Vss2Git.GitExporter.<>c__DisplayClass24_1.<ReplayChangeset>b__0()
   at Hpdi.Vss2Git.GitExporter.AbortRetryIgnore(ThreadStart work, MessageBoxButtons buttons)

if using runtime settings like this:

<runtime>   
		<AppContextSwitchOverrides value="Switch.System.IO.BlockLongPaths=false;Switch.System.IO.UseLegacyPathHandling=false" />   
	</runtime>

then the error become:

ERROR: Could not find a part of the path 'D:\Long\File\Path|name.sql'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Hpdi.Vss2Git.GitExporter.WriteStream(Stream inputStream, String path)
   at Hpdi.Vss2Git.GitExporter.WriteRevisionTo(String physical, Int32 version, String destPath)
   at Hpdi.Vss2Git.GitExporter.ReplayRevision(VssPathMapper pathMapper, Revision revision, GitWrapper git, LinkedList`1 labels)
   at Hpdi.Vss2Git.GitExporter.<>c__DisplayClass24_1.<ReplayChangeset>b__0()
   at Hpdi.Vss2Git.GitExporter.AbortRetryIgnore(ThreadStart work, MessageBoxButtons buttons)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions