{"action":"created","issue":{"url":"https://api.github.com/repos/duplicati/duplicati/issues/3311","repository_url":"https://api.github.com/repos/duplicati/duplicati","labels_url":"https://api.github.com/repos/duplicati/duplicati/issues/3311/labels{/name}","comments_url":"https://api.github.com/repos/duplicati/duplicati/issues/3311/comments","events_url":"https://api.github.com/repos/duplicati/duplicati/issues/3311/events","html_url":"https://github.com/duplicati/duplicati/issues/3311","id":338690964,"node_id":"MDU6SXNzdWUzMzg2OTA5NjQ=","number":3311,"title":"PathTooLongException when using USNJournal","user":{"login":"jojje","id":134889,"node_id":"MDQ6VXNlcjEzNDg4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/134889?v=4","gravatar_id":"","url":"https://api.github.com/users/jojje","html_url":"https://github.com/jojje","followers_url":"https://api.github.com/users/jojje/followers","following_url":"https://api.github.com/users/jojje/following{/other_user}","gists_url":"https://api.github.com/users/jojje/gists{/gist_id}","starred_url":"https://api.github.com/users/jojje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojje/subscriptions","organizations_url":"https://api.github.com/users/jojje/orgs","repos_url":"https://api.github.com/users/jojje/repos","events_url":"https://api.github.com/users/jojje/events{/privacy}","received_events_url":"https://api.github.com/users/jojje/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-05T19:03:24Z","updated_at":"2018-10-04T06:51:11Z","closed_at":null,"author_association":"NONE","body":"- [X ] I have searched open and closed issues for duplicates.\r\n\r\n----------------------------------------\r\n\r\n## Environment info\r\n<!-- Please include some relevant information about your environment. -->\r\n<!-- For \"Backend\", please indicate the backup destination (e.g. Amazon S3, OneDrive, FTP, WebDAV, local). -->\r\n- **Duplicati version**: 2.0.3.9_canary_2018-06-30\r\n- **Operating system**: Windows 7 Pro (64 bit)\r\n- **Backend**: \"Local folder or drive\"\r\n\r\n## Description\r\nWhen re-running a backup set which contains long file/folder names, and using the Journal USN feature introduced in #3184, the backup fails with a `System.IO.PathTooLongException`.\r\n\r\n_Full scan_ backups of the set works however, such as when making the initial backup, or when changing the include / exclude filters for the set, so the problem only seems to occur when the USN Journal code branch is triggered.\r\n\r\n## Steps to reproduce\r\n1. Create a directory or filename with an absolute path longer tan 240 or 255 characters respectively.\r\n2. Create a backup set that includes the dir / folder and set the advanced option `usn-policy` to `Required`.\r\n3. Run the backup set two times.\r\n\r\n- **Actual result**:\r\nThe second time the backup is executed it fails with the exception `System.IO.PathTooLongException`.\r\n\r\n- **Expected result**:\r\nSuccessful backup without the mentioned exception.\r\n\r\n## Debug log\r\n```\r\n2018-07-05 18:39:42 +02 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error\r\nSystem.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.\r\n   at System.IO.PathHelper.GetFullPathName()\r\n   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)\r\n   at System.IO.Path.GetFullPathInternal(String path)\r\n   at System.IO.DirectoryInfo.Init(String path, Boolean checkHost)\r\n   at Duplicati.Library.Snapshots.USNJournal.GetVolumeRootFromPath(String path)\r\n   at Duplicati.Library.Snapshots.UsnJournalService.IsPathEnumerated(String path)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.<>c__DisplayClass12_0.<RunMainOperation>b__2(String path, Int64 fileSize)\r\n   at Duplicati.Library.Main.Database.LocalBackupDatabase.AppendFilesFromPreviousSetWithPredicate(IDbTransaction transaction, Func`3 exclusionPredicate, Int64 fileSetId, Int64 prevFileSetId, DateTime\r\ntimestamp)\r\n   at Duplicati.Library.Main.Database.LocalBackupDatabase.AppendFilesFromPreviousSetWithPredicate(IDbTransaction transaction, Func`3 exclusionPredicate)\r\n   at Duplicati.Library.Main.Operation.Common.SingleRunner.<>c__DisplayClass6_0.<RunOnMain>b__0()\r\n   at Duplicati.Library.Main.Operation.Common.SingleRunner.<>c__DisplayClass5_0`1.<<DoRunOnMain>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.<RunMainOperation>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__19.MoveNext()\r\n```"},"comment":{"url":"https://api.github.com/repos/duplicati/duplicati/issues/comments/426904950","html_url":"https://github.com/duplicati/duplicati/issues/3311#issuecomment-426904950","issue_url":"https://api.github.com/repos/duplicati/duplicati/issues/3311","id":426904950,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjkwNDk1MA==","user":{"login":"NTWarrior","id":854211,"node_id":"MDQ6VXNlcjg1NDIxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/854211?v=4","gravatar_id":"","url":"https://api.github.com/users/NTWarrior","html_url":"https://github.com/NTWarrior","followers_url":"https://api.github.com/users/NTWarrior/followers","following_url":"https://api.github.com/users/NTWarrior/following{/other_user}","gists_url":"https://api.github.com/users/NTWarrior/gists{/gist_id}","starred_url":"https://api.github.com/users/NTWarrior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NTWarrior/subscriptions","organizations_url":"https://api.github.com/users/NTWarrior/orgs","repos_url":"https://api.github.com/users/NTWarrior/repos","events_url":"https://api.github.com/users/NTWarrior/events{/privacy}","received_events_url":"https://api.github.com/users/NTWarrior/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T06:51:11Z","updated_at":"2018-10-04T06:51:11Z","author_association":"NONE","body":"After the first time this happened, I used Everything by VoidTools to find and rename or delete every directory or file in my backup range whose path was too long, but my backup has just finished with the same error regardless."}}
{"actor":{"display_login":"NTWarrior"}}