filerjs / filer

Node-like file system for browsers
BSD 2-Clause "Simplified" License
617 stars 154 forks source link

fs.lstat should return a Stats object including mode #740

Closed humphd closed 5 years ago

humphd commented 5 years ago

Working on my Linux-in-Browser shell again, and hit a bug where fs.stat is returning a proper Stats object with a mode, but fs.lstat is returning a raw database object. This creates a proper Node object in lstat. I've also added tests.

codecov-io commented 5 years ago

Codecov Report

Merging #740 into master will decrease coverage by 0.03%. The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #740      +/-   ##
=========================================
- Coverage   86.63%   86.6%   -0.04%     
=========================================
  Files          16      16              
  Lines        1736    1739       +3     
=========================================
+ Hits         1504    1506       +2     
- Misses        232     233       +1
Impacted Files Coverage Δ
src/filesystem/implementation.js 83.68% <75%> (-0.05%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fa3186d...ce68b3b. Read the comment docs.

humphd commented 5 years ago

Reduced test coverage is due to error handling paths that we can't really test, ignorable.