diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-09-28 08:50:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-28 08:50:16 -0400 |
| commit | 1bb47805d6331ad048bd5e7ea2581aa230e8fc93 (patch) | |
| tree | 7f8707f40415e26530f6e6ccd5cde86b22903163 /ext/fs/in_memory_fs.rs | |
| parent | fc739dc5eb2769e4608ccf08d23ca8ff0fcc19c5 (diff) | |
refactor: move NpmCacheDir to deno_cache_dir (#25916)
Part of the ongoing work to move more of Deno's resolution out of the
CLI crate (for use in Wasm and other things)
Includes:
* https://github.com/denoland/deno_cache_dir/pull/60
Diffstat (limited to 'ext/fs/in_memory_fs.rs')
| -rw-r--r-- | ext/fs/in_memory_fs.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/fs/in_memory_fs.rs b/ext/fs/in_memory_fs.rs index 269202386..e29b9d50c 100644 --- a/ext/fs/in_memory_fs.rs +++ b/ext/fs/in_memory_fs.rs @@ -44,7 +44,7 @@ impl InMemoryFs { pub fn setup_text_files(&self, files: Vec<(String, String)>) { for (path, text) in files { let path = PathBuf::from(path); - self.mkdir_sync(path.parent().unwrap(), true, 0).unwrap(); + self.mkdir_sync(path.parent().unwrap(), true, None).unwrap(); self .write_file_sync( &path, @@ -101,7 +101,7 @@ impl FileSystem for InMemoryFs { &self, path: &Path, recursive: bool, - _mode: u32, + _mode: Option<u32>, ) -> FsResult<()> { let path = normalize_path(path); @@ -119,7 +119,7 @@ impl FileSystem for InMemoryFs { }, None => { if recursive { - self.mkdir_sync(parent, true, 0)?; + self.mkdir_sync(parent, true, None)?; } else { return Err(FsError::Io(Error::new( ErrorKind::NotFound, @@ -149,7 +149,7 @@ impl FileSystem for InMemoryFs { &self, path: PathBuf, recursive: bool, - mode: u32, + mode: Option<u32>, ) -> FsResult<()> { self.mkdir_sync(&path, recursive, mode) } |
