Skip to content

Fix move dir in and to subdir - #81

Merged
Olof-Lagerkvist merged 1 commit into
LTRData:LTRData.DiscUtils-initialfrom
henrikstengaard:fix-fat-move-subdir
Sep 21, 2026
Merged

Olof-Lagerkvist merged 1 commit into
LTRData:LTRData.DiscUtils-initialfrom
henrikstengaard:fix-fat-move-subdir

Conversation

@henrikstengaard

Copy link
Copy Markdown

This PR fixes an issue with FatFileSystem when moving a directory from root directory to a subdirectory.

The root cause is the use of destinationDirectoryName when calling destParent.AttachChildDirectory which expects name of the destination directory and not a path when it already calls AttachChildDirectory on the destParent instance.

Resolving the destination filename using Utilities.GetFileFromPath and passing it to destParent.AttachChildDirectory instead of the destination directory name fixes the issue.

2 tests have been added to verify the fix.

@Olof-Lagerkvist
Olof-Lagerkvist merged commit 5582753 into LTRData:LTRData.DiscUtils-initial Sep 21, 2026
3 checks passed
@Olof-Lagerkvist

Copy link
Copy Markdown
Member

Perfect! Thanks a lot for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants