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

LastModified in BclStorageFile using the wrong source value #18167

Open
BernhardGlueck opened this issue Feb 10, 2025 · 1 comment
Open

LastModified in BclStorageFile using the wrong source value #18167

BernhardGlueck opened this issue Feb 10, 2025 · 1 comment
Labels
bug help-wanted A contribution from the community would be most welcome.

Comments

@BernhardGlueck
Copy link

Describe the bug

In BclStorageItem.cs the implementation of LastModifed seems to be wrong:

if (fileSystemInfo.Exists)
        {
            return new StorageItemProperties(
                fileSystemInfo is FileInfo fileInfo ? (ulong)fileInfo.Length : 0,
                fileSystemInfo.CreationTimeUtc,
                fileSystemInfo.LastAccessTimeUtc);
        }

DateModified in StorageItemProperties implies modification time ,not last access time, i guess LastWriteTimeUtc should be used.

To Reproduce

None

Expected behavior

No response

Avalonia version

11.2.3

OS

No response

Additional context

No response

@maxkatz6 maxkatz6 added the help-wanted A contribution from the community would be most welcome. label Feb 10, 2025
@maxkatz6
Copy link
Member

Good find. Yes, it should be LastWriteTimeUtc.
And it seems this property is supported on Unix platforms too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help-wanted A contribution from the community would be most welcome.
Projects
None yet
Development

No branches or pull requests

2 participants