Repository: abraunegg/onedrive
Pull request #3285: Fix Bug #3276: Fix implementation of 'write_xattr_data' to support FreeBSD
Author: login: abraunegg
Created: 2025-05-21T17:51:10Z | Merged: 2025-05-21T18:32:30Z



* Fix implementation of 'write_xattr_data' to support FreeBSD to resolve compilation failure


Diff:
diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt
index 69bb3cad7..dcfc26774 100644
--- a/.github/actions/spelling/allow.txt
+++ b/.github/actions/spelling/allow.txt
@@ -27,6 +27,7 @@ artix
 ASCIIHTML
 ASpurious
 AThings
+attrnamespace
 aufxw
 aur
 autoclean
@@ -113,6 +114,7 @@ eselect
 estr
 eventfd
 evt
+extattr
 fasynchronous
 fbc
 fcf
diff --git a/src/xattr.d b/src/xattr.d
index 4beac16ff..0ee4d001c 100644
--- a/src/xattr.d
+++ b/src/xattr.d
@@ -8,9 +8,20 @@ import core.stdc.stdio;
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+version (linux) {
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+    }
+}
+
+version (FreeBSD) {
+    extern (C) {
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* name, const(void)* value, size_t size);
+        ssize_t extattr_get_file(const(char)* path, int attrnamespace, const(char)* name, void* value, size_t size);
+    }
+
+    enum EXTATTR_NAMESPACE_USER = 1;
 }
 
 class XAttrException : Exception {
@@ -22,30 +33,57 @@ class XAttrException : Exception {
 // Sets an extended attribute for a given file.
 // Throws `XAttrException` on failure.
 void setXAttr(string filePath, string attrName, string attrValue) {
-    int result = setxattr(filePath.toStringz(), attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length, 0);
-    if (result != 0) {
-        throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+    version (linux) {
+        int result = setxattr(filePath.toStringz(), attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length, 0);
+        if (result != 0) {
+            throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+    } else version (FreeBSD) {
+        int result = extattr_set_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length);
+        if (result < 0) {
+            throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+    } else {
+        throw new XAttrException("xattr not supported on this platform");
     }
 }
 
 // Retrieves an extended attribute value from a file.
-// Returns the attribute value as a string.
-// Throws `XAttrException` if the attribute cannot be read.
+// Returns the attribute value as a string or throws `XAttrException` on failure.
 string getXAttr(string filePath, string attrName) {
-    // First, determine the required buffer size
-    ssize_t size = getxattr(filePath.toStringz(), attrName.toStringz(), null, 0);
-    if (size == -1) {
-        throw new XAttrException("Failed to determine xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
-    }
+    version (linux) {
+        // First, determine the size of the attribute value
+        ssize_t size = getxattr(filePath.toStringz(), attrName.toStringz(), null, 0);
+        if (size < 0) {
+            throw new XAttrException("Failed to get xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
 
-    // Allocate buffer
-    char[] buffer = new char[size];
+        void* buffer = malloc(size);
+        scope(exit) free(buffer);
 
-    // Read the attribute value
-    ssize_t result = getxattr(filePath.toStringz(), attrName.toStringz(), cast(void*)buffer.ptr, buffer.length);
-    if (result == -1) {
-        throw new XAttrException("Failed to read xattr '" ~ attrName ~ "' from '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
-    }
+        ssize_t ret = getxattr(filePath.toStringz(), attrName.toStringz(), buffer, cast(size_t)size);
+        if (ret < 0) {
+            throw new XAttrException("Failed to get xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+
+        return cast(string)(buffer[0 .. size]);
+    } else version (FreeBSD) {
+        // First, determine the size
+        ssize_t size = extattr_get_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), null, 0);
+        if (size < 0) {
+            throw new XAttrException("Failed to get xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+
+        void* buffer = malloc(size);
+        scope(exit) free(buffer);
 
-    return buffer[0 .. result].idup;
+        ssize_t ret = extattr_get_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), buffer, cast(size_t)size);
+        if (ret < 0) {
+            throw new XAttrException("Failed to get xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+
+        return cast(string)(buffer[0 .. size]);
+    } else {
+        throw new XAttrException("xattr not supported on this platform");
+    }
 }


Reviews:
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-21T17:51:13Z
user: login: github-advanced-security[bot]
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-21T18:14:47Z

Review comments:
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[removexattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5251)
created_at: 2025-05-21T17:51:12Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5246)
created_at: 2025-05-21T17:51:12Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5247)
created_at: 2025-05-21T17:51:12Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrnamespace](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5241)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrname](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5236)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5248)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrnamespace](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5242)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrname](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5237)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5249)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrnamespace](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5243)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrname](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5238)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
+        int extattr_list_file(const(char)* path, int attrnamespace, void* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5250)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
+        int extattr_list_file(const(char)* path, int attrnamespace, void* data, size_t nbytes);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrnamespace](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5244)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
+        int extattr_list_file(const(char)* path, int attrnamespace, void* data, size_t nbytes);
+
+        // Define extattr namespaces for FreeBSD
+        enum EXTATTR_NAMESPACE : int {
+            EXTATTR_NAMESPACE_USER = 0x0001,
+            EXTATTR_NAMESPACE_SYSTEM = 0x0002
+        }
+    }
+
+    // FreeBSD: Helper function to get the size of an attribute
+    ssize_t extattr_get_size(const(char)* path, int attrnamespace, const(char)* attrname) {
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrnamespace](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5245)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
+        int extattr_list_file(const(char)* path, int attrnamespace, void* data, size_t nbytes);
+
+        // Define extattr namespaces for FreeBSD
+        enum EXTATTR_NAMESPACE : int {
+            EXTATTR_NAMESPACE_USER = 0x0001,
+            EXTATTR_NAMESPACE_SYSTEM = 0x0002
+        }
+    }
+
+    // FreeBSD: Helper function to get the size of an attribute
+    ssize_t extattr_get_size(const(char)* path, int attrnamespace, const(char)* attrname) {
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrname](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5239)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,44 +8,130 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
-}
-
 class XAttrException : Exception {
     this(string message) {
         super(message);
     }
 }
 
+version (Linux) {
+    // Linux specific imports and C bindings
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+        int removexattr(const(char)* path, const(char)* name);
+    }
+
+    // Define xattr flags for Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0x1, // Set attribute only if it doesn't exist.
+        XATTR_REPLACE = 0x2 // Set attribute only if it already exists.
+    }
+} else { // Define even if not Linux
+    enum XATTR_FLAGS : int {
+        XATTR_CREATE = 0,
+        XATTR_REPLACE = 0
+    }
+}
+
+version (FreeBSD) {
+    // FreeBSD specific imports and C bindings
+    extern (C) {
+        // From <sys/extattr.h>
+        int extattr_get_file(const(char)* path, int attrnamespace, const(char)* attrname, void* data, size_t nbytes);
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* attrname, const(void)* data, size_t nbytes);
+        int extattr_delete_file(const(char)* path, int attrnamespace, const(char)* attrname);
+        int extattr_list_file(const(char)* path, int attrnamespace, void* data, size_t nbytes);
+
+        // Define extattr namespaces for FreeBSD
+        enum EXTATTR_NAMESPACE : int {
+            EXTATTR_NAMESPACE_USER = 0x0001,
+            EXTATTR_NAMESPACE_SYSTEM = 0x0002
+        }
+    }
+
+    // FreeBSD: Helper function to get the size of an attribute
+    ssize_t extattr_get_size(const(char)* path, int attrnamespace, const(char)* attrname) {
+        int result = extattr_get_file(path, attrnamespace, attrname, null, 0);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrname](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5240)
created_at: 2025-05-21T17:51:13Z
author_association: NONE
diff_hunk: @@ -8,9 +8,20 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+version (linux) {
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+    }
+}
+
+version (FreeBSD) {
+    extern (C) {
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* name, const(void)* value, size_t size);
+        ssize_t extattr_get_file(const(char)* path, int attrnamespace, const(char)* name, void* value, size_t size);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5253)
created_at: 2025-05-21T18:14:46Z
author_association: NONE
diff_hunk: @@ -8,9 +8,20 @@
 import std.string;
 import std.conv;
 
-extern (C) {
-    int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
-    ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+version (linux) {
+    extern (C) {
+        int setxattr(const(char)* path, const(char)* name, const(void)* value, size_t size, int flags);
+        ssize_t getxattr(const(char)* path, const(char)* name, void* value, size_t size);
+    }
+}
+
+version (FreeBSD) {
+    extern (C) {
+        int extattr_set_file(const(char)* path, int attrnamespace, const(char)* name, const(void)* value, size_t size);
+        ssize_t extattr_get_file(const(char)* path, int attrnamespace, const(char)* name, void* value, size_t size);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[attrnamespace](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5252)
created_at: 2025-05-21T18:14:46Z
author_association: NONE
diff_hunk: @@ -22,30 +33,57 @@
 // Sets an extended attribute for a given file.
 // Throws `XAttrException` on failure.
 void setXAttr(string filePath, string attrName, string attrValue) {
-    int result = setxattr(filePath.toStringz(), attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length, 0);
-    if (result != 0) {
-        throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+    version (linux) {
+        int result = setxattr(filePath.toStringz(), attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length, 0);
+        if (result != 0) {
+            throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+    } else version (FreeBSD) {
+        int result = extattr_set_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length);
+        if (result < 0) {
+            throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+    } else {
+        throw new XAttrException("xattr not supported on this platform");
     }
 }
 
 // Retrieves an extended attribute value from a file.
-// Returns the attribute value as a string.
-// Throws `XAttrException` if the attribute cannot be read.
+// Returns the attribute value as a string or throws `XAttrException` on failure.
 string getXAttr(string filePath, string attrName) {
-    // First, determine the required buffer size
-    ssize_t size = getxattr(filePath.toStringz(), attrName.toStringz(), null, 0);
-    if (size == -1) {
-        throw new XAttrException("Failed to determine xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
-    }
+    version (linux) {
+        // First, determine the size of the attribute value
+        ssize_t size = getxattr(filePath.toStringz(), attrName.toStringz(), null, 0);
+        if (size < 0) {
+            throw new XAttrException("Failed to get xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
 
-    // Allocate buffer
-    char[] buffer = new char[size];
+        void* buffer = malloc(size);
+        scope(exit) free(buffer);
 
-    // Read the attribute value
-    ssize_t result = getxattr(filePath.toStringz(), attrName.toStringz(), cast(void*)buffer.ptr, buffer.length);
-    if (result == -1) {
-        throw new XAttrException("Failed to read xattr '" ~ attrName ~ "' from '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
-    }
+        ssize_t ret = getxattr(filePath.toStringz(), attrName.toStringz(), buffer, cast(size_t)size);
+        if (ret < 0) {
+            throw new XAttrException("Failed to get xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+
+        return cast(string)(buffer[0 .. size]);
+    } else version (FreeBSD) {
+        // First, determine the size
+        ssize_t size = extattr_get_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), null, 0);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5254)
created_at: 2025-05-21T18:14:46Z
author_association: NONE
diff_hunk: @@ -22,30 +33,57 @@
 // Sets an extended attribute for a given file.
 // Throws `XAttrException` on failure.
 void setXAttr(string filePath, string attrName, string attrValue) {
-    int result = setxattr(filePath.toStringz(), attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length, 0);
-    if (result != 0) {
-        throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+    version (linux) {
+        int result = setxattr(filePath.toStringz(), attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length, 0);
+        if (result != 0) {
+            throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+    } else version (FreeBSD) {
+        int result = extattr_set_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), cast(const(void)*)attrValue.ptr, attrValue.length);
+        if (result < 0) {
+            throw new XAttrException("Failed to set xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+    } else {
+        throw new XAttrException("xattr not supported on this platform");
     }
 }
 
 // Retrieves an extended attribute value from a file.
-// Returns the attribute value as a string.
-// Throws `XAttrException` if the attribute cannot be read.
+// Returns the attribute value as a string or throws `XAttrException` on failure.
 string getXAttr(string filePath, string attrName) {
-    // First, determine the required buffer size
-    ssize_t size = getxattr(filePath.toStringz(), attrName.toStringz(), null, 0);
-    if (size == -1) {
-        throw new XAttrException("Failed to determine xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
-    }
+    version (linux) {
+        // First, determine the size of the attribute value
+        ssize_t size = getxattr(filePath.toStringz(), attrName.toStringz(), null, 0);
+        if (size < 0) {
+            throw new XAttrException("Failed to get xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
 
-    // Allocate buffer
-    char[] buffer = new char[size];
+        void* buffer = malloc(size);
+        scope(exit) free(buffer);
 
-    // Read the attribute value
-    ssize_t result = getxattr(filePath.toStringz(), attrName.toStringz(), cast(void*)buffer.ptr, buffer.length);
-    if (result == -1) {
-        throw new XAttrException("Failed to read xattr '" ~ attrName ~ "' from '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
-    }
+        ssize_t ret = getxattr(filePath.toStringz(), attrName.toStringz(), buffer, cast(size_t)size);
+        if (ret < 0) {
+            throw new XAttrException("Failed to get xattr '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+
+        return cast(string)(buffer[0 .. size]);
+    } else version (FreeBSD) {
+        // First, determine the size
+        ssize_t size = extattr_get_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), null, 0);
+        if (size < 0) {
+            throw new XAttrException("Failed to get xattr size for '" ~ attrName ~ "' on '" ~ filePath ~ "': " ~ to!string(strerror(errno)));
+        }
+
+        void* buffer = malloc(size);
+        scope(exit) free(buffer);
 
-    return buffer[0 .. result].idup;
+        ssize_t ret = extattr_get_file(filePath.toStringz(), EXTATTR_NAMESPACE_USER, attrName.toStringz(), buffer, cast(size_t)size);
path: src/xattr.d
user: login: github-advanced-security[bot]
body: ## Unrecognized Spelling

[extattr](#security-tab) is not a recognized word. \(unrecognized-spelling\)

[Show more details](https://github.com/abraunegg/onedrive/security/code-scanning/5255)
created_at: 2025-05-21T18:14:47Z
author_association: NONE

PR comments:
user: login: github-actions[bot]
created_at: 2025-05-21T17:52:21Z
body: 
# @check-spelling-bot Report

## :red_circle: Please review
### See the [:open_file_folder: files](https://github.com/abraunegg/onedrive/pull/3285/files/) view, the [:scroll:action log](https://github.com/abraunegg/onedrive/actions/runs/15169114551/job/42654460194#step:4:1),  or [:memo: job summary](https://github.com/abraunegg/onedrive/actions/runs/15169114551/attempts/1#summary-42654460194) for details.

### Unrecognized words (4)

attrname
attrnamespace
extattr
removexattr

<details><summary>To accept these unrecognized words as correct,
you could run the following commands</summary>

... in a clone of the [git@github.com:abraunegg/onedrive.git](https://github.com/abraunegg/onedrive.git) repository
on the `fix-issue-3283` branch ([:information_source: how do I use this?](
https://docs.check-spelling.dev/Accepting-Suggestions)):

``` sh
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/abraunegg/onedrive/actions/runs/15169114551/attempts/1' &&
git commit -m 'Update check-spelling metadata'
```
</details>


**OR**

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply [updates](https://github.com/abraunegg/onedrive/actions/runs/15169114551/attempts/1).


author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-21T18:15:06Z
body: 
# @check-spelling-bot Report

## :red_circle: Please review
### See the [:open_file_folder: files](https://github.com/abraunegg/onedrive/pull/3285/files/) view, the [:scroll:action log](https://github.com/abraunegg/onedrive/actions/runs/15169534988/job/42655887106#step:4:1),  or [:memo: job summary](https://github.com/abraunegg/onedrive/actions/runs/15169534988/attempts/1#summary-42655887106) for details.

### Unrecognized words (2)

attrnamespace
extattr

<details><summary>To accept these unrecognized words as correct,
you could run the following commands</summary>

... in a clone of the [git@github.com:abraunegg/onedrive.git](https://github.com/abraunegg/onedrive.git) repository
on the `fix-issue-3283` branch ([:information_source: how do I use this?](
https://docs.check-spelling.dev/Accepting-Suggestions)):

``` sh
curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/abraunegg/onedrive/actions/runs/15169534988/attempts/1' &&
git commit -m 'Update check-spelling metadata'
```
</details>


**OR**

To have the bot accept them for you, comment in the PR quoting the following line:
@check-spelling-bot apply [updates](https://github.com/abraunegg/onedrive/actions/runs/15169534988/attempts/1).


author_association: NONE
user: login: abraunegg
created_at: 2025-05-21T18:31:14Z
body: ### Linux
```
[alex@onedrive-client-dev OneDrive]$ getfattr -n user.onedrive.createdBy ./asdfwerqwer.txt 
# file: asdfwerqwer.txt
user.onedrive.createdBy="SADF ASDF"
```

### FreeBSD
```
alex@freebsd-14x:~/OneDrive $ getextattr user user.onedrive.createdBy ./asfasdfasdfiasdfasdfasdfasdfasd.txt
./asfasdfasdfiasdfasdfasdfasdfasd.txt   SADF ASDF
alex@freebsd-14x:~/OneDrive $ 
```


author_association: OWNER
user: login: abraunegg
created_at: 2025-05-29T02:17:48Z
body: This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
author_association: OWNER