8000 windows: attribute 'archive' only for completed downloads · Issue #3354 · curl/curl · GitHub
[go: up one dir, main page]

Skip to content

windows: attribute 'archive' only for completed downloads #3354

@mark-kubacki

Description

@mark-kubacki

The archive bit (FILE_ATTRIBUTE_ARCHIVE, 0x20) tells files that shall be backed up from those that are either not ready or have not changed.

Downloads in progress are neither ready to be backed up, nor should they be opened by a different process. Only after a download has been completed it's sensible to include it in any integer snapshot or backup of the system.

For example, if you were downloading a Linux ISO you don't want to carry a fraction of it through the history of your backup sets. Indeed, it will give the wrong impression this were the file's valid state.


Open two command prompts, one to start the download and the second to see attributes. We'll focus on the output of the second while the download is in progress.

curl.exe --remote-name <URL>/<fname>
attrib <fname>

… which gives:

A            <fname>

… but the archive bit shouldn't be set at this point, so this is what we'd ideally see (with or without any FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS):

             <fname>

Happens with curl 7.61.1 (x86_64-pc-win32)
using Windows 10 1809, though likely not limited to 10 1809 or 7.61.1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0