{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/8315","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/8315/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/8315/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/8315/events","html_url":"https://github.com/PowerShell/PowerShell/issues/8315","id":382388999,"node_id":"MDU6SXNzdWUzODIzODg5OTk=","number":8315,"title":"Some bits in the file attributes are masked out","user":{"login":"sba923","id":12860484,"node_id":"MDQ6VXNlcjEyODYwNDg0","avatar_url":"https://avatars2.githubusercontent.com/u/12860484?v=4","gravatar_id":"","url":"https://api.github.com/users/sba923","html_url":"https://github.com/sba923","followers_url":"https://api.github.com/users/sba923/followers","following_url":"https://api.github.com/users/sba923/following{/other_user}","gists_url":"https://api.github.com/users/sba923/gists{/gist_id}","starred_url":"https://api.github.com/users/sba923/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sba923/subscriptions","organizations_url":"https://api.github.com/users/sba923/orgs","repos_url":"https://api.github.com/users/sba923/repos","events_url":"https://api.github.com/users/sba923/events{/privacy}","received_events_url":"https://api.github.com/users/sba923/received_events","type":"User","site_admin":false},"labels":[{"id":552752833,"node_id":"MDU6TGFiZWw1NTI3NTI4MzM=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Area-Providers","name":"Area-Providers","color":"5319e7","default":false},{"id":423526741,"node_id":"MDU6TGFiZWw0MjM1MjY3NDE=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Discussion","name":"Issue-Discussion","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-19T20:55:00Z","updated_at":"2018-12-05T20:44:23Z","closed_at":null,"author_association":"NONE","body":"Files in the OneDrive sync folder with the \"Files on Demand\" feature make use of a number of specific attribute bits, such as:\r\n\r\n0x00000200 | SparseFile\r\n0x00000400 | ReparsePoint\r\n0x00001000 | Offline\r\n0x00080000 | Pinned\r\n0x00100000 | Unpinned\r\n\r\n(non-exhaustive list)\r\n\r\nIn PowerShell 6.1, some of the bits are masked out, so code that runs in Windows PowerShell 5.1 will not run correctly under PowerShell 6.1.\r\n\r\n(this might be related to underlying .NET Core behavior, but the PS6 user… doesn't care ;-) )\r\n\r\n# Steps to reproduce\r\n\r\nRun the following commands under PowerShell 6.1:\r\n\r\n```\r\n\"'{0:x}' -f (gi 'C:\\Users\\steph\\OneDrive\\Always keep on this device.txt').Attributes\r\n\"'{0:x}' -f (gi 'C:\\Users\\steph\\OneDrive\\Free up space.txt').Attributes\r\n```\r\n\r\n# Expected behavior\r\n\r\nThe output should be:\r\n```\r\n00080420\r\n00401620\r\n```\r\nlike in Windows PowerShell 5.1.\r\n\r\n# Actual behavior\r\nInstead, PowerShell 6.1 outputs:\r\n\r\n```\r\n00080020\r\n00400020\r\n```\r\n\r\n# Environment data\r\n\r\n```\r\nName                           Value\r\n----                           -----\r\nPSVersion                      6.1.0\r\nPSEdition                      Core\r\nGitCommitId                    6.1.0\r\nOS                             Microsoft Windows 10.0.17763\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments/444640203","html_url":"https://github.com/PowerShell/PowerShell/issues/8315#issuecomment-444640203","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/8315","id":444640203,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDY0MDIwMw==","user":{"login":"SteveL-MSFT","id":11859881,"node_id":"MDQ6VXNlcjExODU5ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/11859881?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveL-MSFT","html_url":"https://github.com/SteveL-MSFT","followers_url":"https://api.github.com/users/SteveL-MSFT/followers","following_url":"https://api.github.com/users/SteveL-MSFT/following{/other_user}","gists_url":"https://api.github.com/users/SteveL-MSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveL-MSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveL-MSFT/subscriptions","organizations_url":"https://api.github.com/users/SteveL-MSFT/orgs","repos_url":"https://api.github.com/users/SteveL-MSFT/repos","events_url":"https://api.github.com/users/SteveL-MSFT/events{/privacy}","received_events_url":"https://api.github.com/users/SteveL-MSFT/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T20:44:23Z","updated_at":"2018-12-05T20:44:23Z","author_association":"MEMBER","body":"We probably need to call: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-rtlsetprocessplaceholdercompatibilitymode\r\n"}}
{"actor":{"display_login":"SteveL-MSFT"}}