Skip to content

Commit 65e26ae

Browse files
authored
Fix shortcuts to folders opening outside Files (#9984)
Turn fields into properties for serialization
1 parent fdb2141 commit 65e26ae

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

src/Files.Shared/ShellFileItem.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ namespace Files.Shared
44
{
55
public class ShellFileItem
66
{
7-
public bool IsFolder;
8-
public string RecyclePath;
9-
public string FileName;
10-
public string FilePath;
11-
public DateTime RecycleDate;
12-
public DateTime ModifiedDate;
13-
public DateTime CreatedDate;
14-
public string FileSize;
15-
public ulong FileSizeBytes;
16-
public string FileType;
7+
public bool IsFolder { get; set; }
8+
public string RecyclePath { get; set; }
9+
public string FileName { get; set; }
10+
public string FilePath { get; set; }
11+
public DateTime RecycleDate { get; set; }
12+
public DateTime ModifiedDate { get; set; }
13+
public DateTime CreatedDate { get; set; }
14+
public string FileSize { get; set; }
15+
public ulong FileSizeBytes { get; set; }
16+
public string FileType { get; set; }
1717

1818
public ShellFileItem()
1919
{

src/Files.Shared/ShellLibraryItem.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,35 @@ public class ShellLibraryItem
1515
/// C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms<br/>
1616
/// C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Custom library.library-ms
1717
/// </summary>
18-
public string FullPath;
18+
public string FullPath { get; set; }
1919

2020
/// <summary>
2121
/// ShellItemDisplayString.DesktopAbsoluteParsing<br/>
2222
/// <br/>
2323
/// ::{031E4825-7B94-4DC3-B131-E946B44C8DD5}\Documents.library-ms<br/>
2424
/// C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Custom library.library-ms
2525
/// </summary>
26-
public string AbsolutePath;
26+
public string AbsolutePath { get; set; }
2727

2828
/// <summary>
2929
/// ShellItemDisplayString.ParentRelativeParsing<br/>
3030
/// <br/>
3131
/// {7B0DB17D-9CD2-4A93-9733-46CC89022E7C}<br/>
3232
/// Custom library.library-ms
3333
/// </summary>
34-
public string RelativePath;
34+
public string RelativePath { get; set; }
3535

3636
/// <summary>
3737
/// ShellItemDisplayString.NormalDisplay<br/>
3838
/// <br/>
3939
/// Documents (locale dependent based on desktop.ini file of the Libraries folder)<br/>
4040
/// Custom library (locale independent)
4141
/// </summary>
42-
public string DisplayName;
42+
public string DisplayName { get; set; }
4343

44-
public bool IsPinned;
45-
public string DefaultSaveFolder;
46-
public string[] Folders;
44+
public bool IsPinned { get; set; }
45+
public string DefaultSaveFolder { get; set; }
46+
public string[] Folders { get; set; }
4747

4848
public ShellLibraryItem()
4949
{

src/Files.Shared/ShellLinkItem.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
{
33
public class ShellLinkItem : ShellFileItem
44
{
5-
public string TargetPath;
6-
public string Arguments;
7-
public string WorkingDirectory;
8-
public bool RunAsAdmin;
5+
public string TargetPath { get; set; }
6+
public string Arguments { get; set; }
7+
public string WorkingDirectory { get; set; }
8+
public bool RunAsAdmin { get; set; }
99

1010
public ShellLinkItem()
1111
{

0 commit comments

Comments
 (0)