Skip to content

Upload Staging: System.IO.DirectoryNotFoundException: Could not find a part of the path. #48

@rffrasca

Description

@rffrasca

Describe the bug
When a PDF is being staged for uploading in the UploadStaging folder, a System.IO.DirectoryNotFoundException is being thrown when the length of the PDF path name is > 259 characters.

To Reproduce
Steps to reproduce the behavior:

  1. Click File menu and then Add
  2. Select PDF
  3. Enter data in Add PDF dialog
  4. Click OK
  5. See error

Expected behavior
PDFKeeper should proceed to upload the PDF to the database.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 22H2
  • PDFKeeper Version: 11.0.0 and lower

Additional context
System.IO.DirectoryNotFoundException: Could not find a part of the path.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileInfo.MoveTo(String destFileName)
at PDFKeeper.Core.Commands.UploadStagingCommand.Execute()
at PDFKeeper.Core.Presenters.AddPdfPresenter.AddPdf(Boolean deleteSourcePdf)
at PDFKeeper.WinForms.Views.AddPdfForm.OK_Button_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions