Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 15 additions & 26 deletions src/Files.App (Package)/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Identity
Name="FilesDev"
Publisher="CN=Files"
Version="3.8.1.0" />
Version="3.3.4.0" />

<Properties>
<DisplayName>Files - Dev</DisplayName>
Expand All @@ -33,11 +33,11 @@
<Resource Language="en-US" />
<Resource Language="af" />
<Resource Language="ar" />
<Resource Language="be-BY" />
<Resource Language="bg" />
<Resource Language="ca" />
<Resource Language="cs-CZ" />
<Resource Language="da" />
<Resource Language="da-DK" />
<Resource Language="de-DE" />
<Resource Language="el" />
<Resource Language="en-GB" />
Expand All @@ -55,21 +55,18 @@
<Resource Language="it-IT" />
<Resource Language="ja-JP" />
<Resource Language="ka" />
<Resource Language="km-KH" />
<Resource Language="ko-KR" />
<Resource Language="lt-LT" />
<Resource Language="lv-LV" />
<Resource Language="ms-MY" />
<Resource Language="lt" />
<Resource Language="lv-LV" />
<Resource Language="nb-NO" />
<Resource Language="nl-NL" />
<Resource Language="or-IN" />
<Resource Language="pl-PL" />
<Resource Language="pt-BR" />
<Resource Language="pt-PT" />
<Resource Language="ro-RO" />
<Resource Language="ru-RU" />
<Resource Language="sk-SK" />
<Resource Language="sq-AL" />
<Resource Language="sr-Cyrl" />
<Resource Language="sk-SK" />
<Resource Language="sv-SE" />
<Resource Language="ta" />
<Resource Language="th-TH" />
Expand Down Expand Up @@ -98,7 +95,7 @@
Wide310x150Logo="Assets\AppTiles\Dev\Wide310x150Logo.png"
Square71x71Logo="Assets\AppTiles\Dev\Small71x71Logo.png"
Square310x310Logo="Assets\AppTiles\Dev\Large310x310Logo.png"
ShortName="Files - Dev">
ShortName="Files">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
Expand All @@ -119,26 +116,12 @@
</uap3:Extension>

<uap:Extension Category="windows.protocol">
<!-- This is kept for backward compatibility. -->
<uap:Protocol ReturnResults="none" Name="files-uwp" />
</uap:Extension>

<uap:Extension Category="windows.protocol">
<!-- This is kept for backward compatibility. -->
<uap:Protocol ReturnResults="none" Name="files" />
</uap:Extension>

<uap:Extension Category="windows.protocol">
<!-- This value changes based on the build branch by CI (files-stable, files-preview, files-dev). -->
<uap:Protocol ReturnResults="none" Name="files-dev" />
</uap:Extension>

<uap5:Extension Category="windows.appExecutionAlias">
<uap5:AppExecutionAlias>
<!-- This is kept for backward compatibility. -->
<uap5:ExecutionAlias Alias="files.exe" />
<!-- This value changes based on the build branch by CI (files-stable, files-preview, files-dev). -->
<uap5:ExecutionAlias Alias="files-dev.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>

Expand All @@ -160,7 +143,6 @@
<uap:FileType>.tar</uap:FileType>
<uap:FileType>.jar</uap:FileType>
<uap:FileType>.mrpack</uap:FileType>
<uap:FileType>.gz</uap:FileType>
</uap:SupportedFileTypes>
<uap:Logo>assets\archives\ExtensionIcon.png</uap:Logo>
</uap:FileTypeAssociation>
Expand All @@ -171,7 +153,7 @@
</Application>
</Applications>

<!-- To host The background task component, this activatable class entry must be added. -->
<!-- To Host The Background Task Component, This Activatable Class Entry Must Be Added. -->
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
Expand All @@ -184,6 +166,13 @@
<Path>Files.App.Server\Files.App.Server.exe</Path>
<Instancing>singleInstance</Instancing>
<ActivatableClass ActivatableClassId="Files.App.Server.AppInstanceMonitor" />
<ActivatableClass ActivatableClassId="Files.App.Server.Database.FileTagsDatabase" />
<ActivatableClass ActivatableClassId="Files.App.Server.Database.LayoutPreferencesDatabase" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.ColumnPreferences" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.ColumnPreferencesItem" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.TaggedFile" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.LayoutPreferences" />
<ActivatableClass ActivatableClassId="Files.App.Server.Data.LayoutPreferencesItem" />
</OutOfProcessServer>
</Extension>
</Extensions>
Expand Down
28 changes: 15 additions & 13 deletions src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
using Files.App.Services.SizeProvider;
using Files.Shared.Helpers;
using System.IO;
using Vanara.PInvoke;
using Windows.Storage;
using static Files.App.Helpers.Win32Helper;
using static Files.App.Helpers.NativeFindStorageItemHelper;

Check failure on line 9 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, x64)

The type or namespace name 'NativeFindStorageItemHelper' does not exist in the namespace 'Files.App.Helpers' (are you missing an assembly reference?)

Check failure on line 9 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, arm64)

The type or namespace name 'NativeFindStorageItemHelper' does not exist in the namespace 'Files.App.Helpers' (are you missing an assembly reference?)

Check failure on line 9 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, x64)

The type or namespace name 'NativeFindStorageItemHelper' does not exist in the namespace 'Files.App.Helpers' (are you missing an assembly reference?)

Check failure on line 9 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, arm64)

The type or namespace name 'NativeFindStorageItemHelper' does not exist in the namespace 'Files.App.Helpers' (are you missing an assembly reference?)
using FileAttributes = System.IO.FileAttributes;

namespace Files.App.Utils.Storage
Expand All @@ -17,10 +18,11 @@

private static readonly string folderTypeTextLocalized = "Folder".GetLocalizedResource();


public static async Task<List<ListedItem>> ListEntries(
string path,
IntPtr hFile,
Win32PInvoke.WIN32_FIND_DATA findData,
NativeFindStorageItemHelper.WIN32_FIND_DATA findData,

Check failure on line 25 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, x64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 25 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, arm64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 25 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, x64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 25 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, arm64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)
CancellationToken cancellationToken,
int countLimit,
Func<List<ListedItem>, Task> intermediateAction
Expand Down Expand Up @@ -97,16 +99,16 @@
// clear the temporary list every time we do an intermediate action
tempList.Clear();
}
} while (Win32PInvoke.FindNextFile(hFile, out findData));
} while (FindNextFile(hFile, out findData));

Win32PInvoke.FindClose(hFile);
FindClose(hFile);

return tempList;
}

private static IEnumerable<ListedItem> EnumAdsForPath(string itemPath, ListedItem main)
{
foreach (var ads in Win32Helper.GetAlternateStreams(itemPath))
foreach (var ads in NativeFileOperationsHelper.GetAlternateStreams(itemPath))
yield return GetAlternateStream(ads, main);
}

Expand Down Expand Up @@ -143,7 +145,7 @@
}

public static async Task<ListedItem> GetFolder(
Win32PInvoke.WIN32_FIND_DATA findData,
NativeFindStorageItemHelper.WIN32_FIND_DATA findData,

Check failure on line 148 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, x64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 148 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, arm64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 148 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, x64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 148 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, arm64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)
string pathRoot,
bool isGitRepo,
CancellationToken cancellationToken
Expand All @@ -157,10 +159,10 @@

try
{
Win32PInvoke.FileTimeToSystemTime(ref findData.ftLastWriteTime, out Win32PInvoke.SYSTEMTIME systemModifiedTimeOutput);
FileTimeToSystemTime(ref findData.ftLastWriteTime, out NativeFindStorageItemHelper.SYSTEMTIME systemModifiedTimeOutput);
itemModifiedDate = systemModifiedTimeOutput.ToDateTime();

Win32PInvoke.FileTimeToSystemTime(ref findData.ftCreationTime, out Win32PInvoke.SYSTEMTIME systemCreatedTimeOutput);
FileTimeToSystemTime(ref findData.ftCreationTime, out NativeFindStorageItemHelper.SYSTEMTIME systemCreatedTimeOutput);
itemCreatedDate = systemCreatedTimeOutput.ToDateTime();
}
catch (ArgumentException)
Expand Down Expand Up @@ -220,7 +222,7 @@
}

public static async Task<ListedItem> GetFile(
Win32PInvoke.WIN32_FIND_DATA findData,
NativeFindStorageItemHelper.WIN32_FIND_DATA findData,

Check failure on line 225 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, x64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 225 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Debug, arm64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 225 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, x64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 225 in src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

View workflow job for this annotation

GitHub Actions / build (Release, arm64)

The type or namespace name 'NativeFindStorageItemHelper' could not be found (are you missing a using directive or an assembly reference?)
string pathRoot,
bool isGitRepo,
CancellationToken cancellationToken
Expand All @@ -233,13 +235,13 @@

try
{
Win32PInvoke.FileTimeToSystemTime(ref findData.ftLastWriteTime, out Win32PInvoke.SYSTEMTIME systemModifiedDateOutput);
FileTimeToSystemTime(ref findData.ftLastWriteTime, out NativeFindStorageItemHelper.SYSTEMTIME systemModifiedDateOutput);
itemModifiedDate = systemModifiedDateOutput.ToDateTime();

Win32PInvoke.FileTimeToSystemTime(ref findData.ftCreationTime, out Win32PInvoke.SYSTEMTIME systemCreatedDateOutput);
FileTimeToSystemTime(ref findData.ftCreationTime, out NativeFindStorageItemHelper.SYSTEMTIME systemCreatedDateOutput);
itemCreatedDate = systemCreatedDateOutput.ToDateTime();

Win32PInvoke.FileTimeToSystemTime(ref findData.ftLastAccessTime, out Win32PInvoke.SYSTEMTIME systemLastAccessOutput);
FileTimeToSystemTime(ref findData.ftLastAccessTime, out NativeFindStorageItemHelper.SYSTEMTIME systemLastAccessOutput);
itemLastAccessDate = systemLastAccessOutput.ToDateTime();
}
catch (ArgumentException)
Expand Down Expand Up @@ -270,7 +272,7 @@

// https://learn.microsoft.com/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4
bool isReparsePoint = ((FileAttributes)findData.dwFileAttributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
bool isSymlink = isReparsePoint && findData.dwReserved0 == Win32PInvoke.IO_REPARSE_TAG_SYMLINK;
bool isSymlink = isReparsePoint && findData.dwReserved0 == NativeFileOperationsHelper.IO_REPARSE_TAG_SYMLINK;

if (isSymlink)
{
Expand Down
Loading