summaryrefslogtreecommitdiff
path: root/ext/fs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fs')
-rw-r--r--ext/fs/30_fs.js9
-rw-r--r--ext/fs/std_fs.rs2
2 files changed, 7 insertions, 4 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js
index b0d3beeda..3b4392006 100644
--- a/ext/fs/30_fs.js
+++ b/ext/fs/30_fs.js
@@ -260,7 +260,7 @@ function createByteStruct(types) {
// types can be "date", "bool" or "u64".
let offset = 0;
let str =
- 'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux" || Deno.build.os === "openbsd" || Deno.build.os === "freebsd"; return {';
+ 'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux" || Deno.build.os === "android" || Deno.build.os === "openbsd" || Deno.build.os === "freebsd"; return {';
const typeEntries = ObjectEntries(types);
for (let i = 0; i < typeEntries.length; ++i) {
let { 0: name, 1: type } = typeEntries[i];
@@ -325,8 +325,11 @@ const { 0: statStruct, 1: statBuf } = createByteStruct({
});
function parseFileInfo(response) {
- const unix = core.build.os === "darwin" || core.build.os === "linux" ||
- core.build.os === "freebsd" || core.build.os === "openbsd";
+ const unix = core.build.os === "darwin" ||
+ core.build.os === "linux" ||
+ core.build.os === "android" ||
+ core.build.os === "freebsd" ||
+ core.build.os === "openbsd";
return {
isFile: response.isFile,
isDirectory: response.isDirectory,
diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs
index d52879394..bb8d114a0 100644
--- a/ext/fs/std_fs.rs
+++ b/ext/fs/std_fs.rs
@@ -62,7 +62,7 @@ impl FileSystem for RealFs {
let _ = umask(prev);
prev
};
- #[cfg(target_os = "linux")]
+ #[cfg(any(target_os = "android", target_os = "linux"))]
{
Ok(r.bits())
}