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

Path too long in temp directory while export notebook #546

Closed
MiRaIOMeZaSu opened this issue Jul 23, 2022 · 0 comments · Fixed by #574
Closed

Path too long in temp directory while export notebook #546

MiRaIOMeZaSu opened this issue Jul 23, 2022 · 0 comments · Fixed by #574
Assignees
Labels
bug Something isn't working released Available in a released installer

Comments

@MiRaIOMeZaSu
Copy link

Describe the bug
While exporting notebook with onemore, I got error said that the path was over 248 or file path was over 260, and the export progress closed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to notebook and right click
  2. Click on 'export notebook'
  3. See error

Expected behavior
I found it is because onemore would cache temp document at user temp directory,so I switch my temp directory to shorter path, but still failed, I suggest that onemore should not store the page as its title is. For example, cache each page or even section as hash.What's more, onemore could detect the length of onemore in advance so this would not happen.
PS: I follow some tutorial to edit regedit or gpedit to cancel the limit of windows, but none of them works for onemore.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Environment (if applicable):

  • OneNote Version: onenote2016mso
  • OneMore Version: OneMore_4.18_Setupx64

Additional context

6332:12] ..publishing page to C:\Users\timeC\AppData\Local\Temp\45w4bgul\夢's Notebook\Quick Notes\zhang0peter_bilibili-video-information-spider_ B站2千万视频信息爬虫\zhang0peter_bilibili-video-information-spider_ B站2千万视频信息爬虫.htm
6332:6] ..publishing page to C:\Users\timeC\AppData\Local\Temp\45w4bgul\夢's Notebook\Quick Notes\网络工程师RIP跳数问题软考网络工程师中:05年上半年36题:RIP规定一条通路上最多可包含的路由器数量是()A.1个B.16个C.15个D.无数个选C可08年下25题:RIP规定,通路上经过的最大路_作业帮\网络工程师RIP跳数问题软考网络工程师中:05年上半年36题:RIP规定一条通路上最多可包含的路由器数量是()A.1个B.16个C.15个D.无数个选C可08年下25题:RIP规定,通路上经过的最大路_作业帮.htm
6332:6] ..error publishig page as HTML
6332:6] ..System.IO.PathTooLongException
Message: 指定的路径或文件名太长,或者两者都太长。完全限定文件名必须少于 260 个字符,并且目录名必须少于 248 个字符。
Source: mscorlib
StackTrace:    在 System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   在 System.IO.Path.InternalGetDirectoryName(String path)
   在 River.OneMoreAddIn.Commands.Archivist.Export(String pageId, String filename, ExportFormat format, Boolean withAttachments, Boolean embedded)
TargetSite: [mscorlib] System.IO.Path::LegacyNormalizePath()

6332:6] ..指定的路径或文件名太长,或者两者都太长。完全限定文件名必须少于 260 个字符,并且目录名必须少于 248 个字符。
6332:6] ..System.IO.PathTooLongException
Message: 指定的路径或文件名太长,或者两者都太长。完全限定文件名必须少于 260 个字符,并且目录名必须少于 248 个字符。
Source: mscorlib
StackTrace:    在 System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   在 System.IO.Path.InternalGetDirectoryName(String path)
   在 River.OneMoreAddIn.Commands.ArchiveCommand.<ArchivePage>d__14.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   在 River.OneMoreAddIn.Commands.ArchiveCommand.<Archive>d__13.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   在 River.OneMoreAddIn.Commands.ArchiveCommand.<Archive>d__13.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   在 River.OneMoreAddIn.Commands.ArchiveCommand.<Execute>d__11.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   在 River.OneMoreAddIn.UI.ProgressDialog.<<OnShown>b__11_0>d.MoveNext()
TargetSite: [mscorlib] System.IO.Path::LegacyNormalizePath()
@MiRaIOMeZaSu MiRaIOMeZaSu added bug Something isn't working unread I have seen it or had time to refine it yet labels Jul 23, 2022
@stevencohn stevencohn removed the unread I have seen it or had time to refine it yet label Jul 23, 2022
@stevencohn stevencohn self-assigned this Aug 23, 2022
@stevencohn stevencohn added the developing Accepted and development is in progress label Aug 23, 2022
@stevencohn stevencohn linked a pull request Aug 25, 2022 that will close this issue
@stevencohn stevencohn added next-release Addressed but not yet released released Available in a released installer and removed developing Accepted and development is in progress next-release Addressed but not yet released labels Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in a released installer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants