Comments (6)
Huh. I don't have any ideas off the top of my head, but I should look into this more. Could you make a Web page of your own with a leading dot and see if that also breaks it?
from tabfs.
Good idea. I created /tmp/test.html
containing
<html>
<head>
<title>.:: test ::.</title>
</head>
</html>
and open file:///tmp/test.html
and now get
/usr/bin/ls: cannot access '/home/eichin/gits/TabFS/fs/mnt/tabs/by-title/.___test____.4445': Level 2 not synchronized
?????????? ? ? ? ? ? .___test____.4445
If I strip it down to .:
it still fails; .
by itself works as does .x
.
from tabfs.
(if it matters this is Google Chrome 102.0.5005.115 (Official Build) (64-bit)
as I see I didn't include that in the initial post.)
from tabfs.
strace
confirms that the ls
is getting an EL2NSYNC
, but I don't find reference to that in the fuse sources, or really anywhere but fairly obscure places in the kernel.
97267 statx(AT_FDCWD</home/eichin/tmp/deb>, "/home/eichin/gits/TabFS/fs/mnt/tabs/by-title/._.4445", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_MODE|STATX_NLINK|STATX_UID|STATX_GID|STATX_MTIME|STATX_SIZE, 0x7ffec4298820) = -1 EL2NSYNC (Level 2 not synchronized)
(That does suggest the kernel matters, so uname -r
output for reference: 5.15.0-23-generic
)
from tabfs.
Ah! Recalling that errno
values are really just numbers... for x86_64
linux, EL2NSYNC
is 45. Looking at extension/background.js
, though,
const unix = {
...
ENOTSUP: 45,
...
so that's probably the value that's making it through.
The only reference to that is
function tryMatchRoute(path) {
if (path.match(/\/\._[^\/]+$/)) {
// Apple Double ._whatever file for xattrs
throw new UnixError(unix.ENOTSUP);
}
which... is definitely suspicious :-)
from tabfs.
So there are two issues here. The easier one would be that the AppleDouble filtering matches some sanitize
d paths, that probably just means tweaking sanitize
a little.
The trickier one is that errno
is platform specific in a way that JavaScript intentionally conceals. If I'm reading this right, the path is that in background.js
, onMessage
has a try/catch, and if it catches a UnixError
puts the error value in response.error
. From there, tabfs.c
do_exchange
looks for {error: %d}
with json_scanf
and grabs that number.
Suggestion: tabfs.c
knows what platform it's on (has a couple of #if defined
but more importantly, already includes <errno.h>
.) Put a translation there; you could make the unix
enumeration in background.js
just have a list of values... but I'd go with just having it return text tokens outright - then tabfs can check for strings and return the proper platform-specific errno values. Not a lot of overhead (you're passing JSON messages around anyway) though it is a change in the protocol; if that's a concern, then taking the current numbers and translating them makes more sense.
from tabfs.
Related Issues (20)
- RSS content ?
- Support for Firefox Multi-Account Containers
- Setup with flathub/org.chromium.Chromium on Linux
- Move tabs between windows? HOT 2
- touch evals/script.js to evaluate it again
- Set of words in text.txt files for autocomplete
- Running on multiple profiles
- How to get text/body content when in Reader mode? (firefox)
- [Feature Request] Headers
- Document how to use TABFS_MOUNT_DIR HOT 1
- not able to access debugger folder HOT 2
- Which tabs are playing music? HOT 1
- Idea: Use in-browser WebAssembly to emulate a unix system to use TabFS HOT 2
- Upgrading to Manifest v3
- Non-existent tabs under 'by-id' HOT 1
- Manifest file is missing or unreadable
- maybe the symbolic link implementation for fusefs is not correct?
- Can't see or delete some watches files
- Could TabFS eventually become a 'provider' in Powershell?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabfs.