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

[core] Fix several bugs with 'EngineSettings.UsePartialFiles' #608

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

alanmcgovern
Copy link
Owner

@alanmcgovern alanmcgovern commented Jan 25, 2023

This adds several additional tests covering aspects of how this feature was intended to operate.

The 'Complete' and 'Incomplete' paths are now generated using a helper method. The choice of whether or not to use the 'Complete' or 'Incomplete' path as the current path is dependent on whether or not 'UsePartialFiles' is on, and if the file is already considered 'complete' or 'incomplete'.

This should keep everything in sync when toggling UsePartialFiles on and off, and also if the user uses 'MoveFileAsync', or 'MoveFilesASync' to move files.

The code docs should also be updated to clarify that if UsePartialFiles is enabled and someone moves an incomplete file to some_directory/file.ext then the engine will actually move the file to some_directory/file.ext.!mt as it is a partial file. Once the file is fully downloaded it will be placed at some_directory/file.ext. Similarly, if UsePartialFiles is disabled, all partial files will have .!mt removed from their filename.

Fixes #606

This adds several additional tests covering aspects of how this
feature was intended to operate.

The 'Complete' and 'Incomplete' paths are now generated using
a uniform method. The choice of whether or not to use the
'Complete' or 'Incomplete' path as the current path is
dependent on whether or not 'UsePartialFiles' is on, and
if the file is complete.

This should keep everything in sync when toggling UsePartialFiles
on and off, and also if the user uses 'MoveFileAsync', or
'MoveFilesASync' to move files.
@alanmcgovern alanmcgovern merged commit e0947a8 into master Jan 27, 2023
@alanmcgovern alanmcgovern deleted the fix-use-partial-files branch January 27, 2023 19:16
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.

Using MoveFileAsync causes FullPath to be neither DownloadIncompleteFullPath nor DownloadCompleteFullPath
1 participant