@photostructure/fs-metadata 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -14,6 +14,12 @@ Fixed for any bug fixes.
14
14
  Security in case of vulnerabilities.
15
15
  -->
16
16
 
17
+ ## 1.0.1 - 2026-03-01
18
+
19
+ ### Fixed
20
+
21
+ - `isHidden()` and `getHiddenMetadata()` now return `false` for root directories on all platforms. Windows root drives (e.g. `C:\`) have `FILE_ATTRIBUTE_HIDDEN` set by default as a system quirk, not user intent.
22
+
17
23
  ## 1.0.0 - 2026-02-23
18
24
 
19
25
  ### Security
package/dist/index.cjs CHANGED
@@ -493,6 +493,10 @@ async function isHiddenImpl(pathname, nativeFn2) {
493
493
  throw new Error("Invalid pathname: " + JSON.stringify(pathname));
494
494
  }
495
495
  debug("Normalized path: %s", norm);
496
+ if (isRootDirectory(norm)) {
497
+ debug("Root directory, returning false");
498
+ return false;
499
+ }
496
500
  debug(
497
501
  "LocalSupport: dotPrefix=%s, systemFlag=%s",
498
502
  LocalSupport.dotPrefix,
@@ -565,6 +569,14 @@ async function getHiddenMetadataImpl(pathname, nativeFn2) {
565
569
  if (norm == null) {
566
570
  throw new Error("Invalid pathname: " + JSON.stringify(pathname));
567
571
  }
572
+ if (isRootDirectory(norm)) {
573
+ return {
574
+ hidden: false,
575
+ dotPrefix: false,
576
+ systemFlag: false,
577
+ supported: LocalSupport
578
+ };
579
+ }
568
580
  const dotPrefix = isPosixHidden(norm);
569
581
  const systemFlag = await isSystemHidden(norm, nativeFn2);
570
582
  return {