question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mirror.cs incorrectly sets attributes on open

See original GitHub issue

In the mirror sample, around line 200 it has this:

if (mode == FileMode.CreateNew || mode == FileMode.Create) //Files are always created as Archive
                        attributes |= FileAttributes.Archive;
                    File.SetAttributes(filePath, attributes);

If you open an existing file with the readonly and/or archive bit set (eg open in Notepad), then attributes is Normal at the start of CreateFile and this line basically removes all attributes, clearing the readonly / archive flag on the file.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dangibsoncommented, Sep 29, 2020

That looks good. Thanks for your help.

0reactions
Lirynacommented, Sep 29, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Having issue with Unity 3D Mirror API: Declaring a struct ...
I don't think I'm supposed to declare notification as a type struct, but even leaving it as a class doesn't yield the code...
Read more >
Unity doesn't seem to get updates to mirror-inherited code
The issue is due to inheritance of a Mirror class while using one or more SyncVars.
Read more >
Make Mirror robust to input data with incorrect `__typename`s
In the Mirror _initialize method, in the objects table declaration, remove the NOT NULL constraint from the typename column. · Add a CHECK ......
Read more >
Manage Mirror Topics for Cluster Linking on ...
Create source and mirror topics in the Quick Start for Cluster Linking on ... To enable this functionality, you must set two properties...
Read more >
Attribute position problem on mirrored blocks
Solved: Hi everyone, I have created a dynamic block with attributes in it. It works ok except for one thing. When I mirror...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found