Comments (10)
This is a separate error and as such should have a new issue.
I think the problem here is encoding. There is at least a handful of ways to encode something as simple as a text file from ASCII to UTF-8. This would be a fairly simple fix if I knew what encoding would be most versatile, right now I am just using a simple python string representation which I think is based on ASCII and "\n" for newline. If you have input on what binary representation that would be best please let me know.
from b2_fuse.
Also as for why some programs will be unable to open the file. A lot of GUI editors will do several rounds of READ, FLUSH and maybe even WRITE to a file even though you are not actually modifying anything. These files do inherently not support neither WRITE nor FLUSH. As such if your application tries either of these there will be problems. This feature was meant as a way to expose a bit more of the underlying features that B2 provides in case someone wanted to make a high level synchronization application on top of B2Fuse. As such I do not think it makes sense to make support for GUI editors (beyond the most basic like nano) a priority.
from b2_fuse.
I think the problem here is encoding. There is at least a handful of ways to encode something as simple as a text file from ASCII to UTF-8. This would be a fairly simple fix if I knew what encoding would be most versatile, right now I am just using a simple python string representation which I think is based on ASCII and "\n" for newline. If you have input on what binary representation that would be best please let me know.
I am not sure at all, but UTF-8 looks to me like the most widely used encoding.
Also as for why some programs will be unable to open the file. A lot of GUI editors will do several rounds of READ, FLUSH and maybe even WRITE to a file even though you are not actually modifying anything. These files do inherently not support neither WRITE nor FLUSH. As such if your application tries either of these there will be problems. This feature was meant as a way to expose a bit more of the underlying features that B2 provides in case someone wanted to make a high level synchronization application on top of B2Fuse. As such I do not think it makes sense to make support for GUI editors (beyond the most basic like nano) a priority.
I agree with that. The kate editor, for example, makes a temporary file when opening and when saving it deletes the original file and gives the temporary file the original name, making it unsuitable to edit hardlinked files; quite an unpleasant behaviour! The above mentioned geany editor doesn't have that problem (no problems with hardlinked files), and it had the most consistent behaviour: it used the wrong encoding. But isn't it extrange the aparently random behaviour with nano I described above? Is nano what you would call a GUI editor? Anyway, these files are not intended to be edited, just to be viewed, and it is not worth the effort to adapt them to GUI editors IMO.
from b2_fuse.
Yes, the nano behaviour is indeed very weird. No, I would not classify nano as a GUI editor. I tried nano myself and found out how to trigger the “^@”. For each attempt open a new console and access one of these ".sha1" files. The first time a file is accessed (and only the first) this oddity happens. I have no clue as to why.
from b2_fuse.
In my case, opening nano from Dolphin file manager it appears random-like. But that means opening a new console each time I use nano.
from b2_fuse.
I am not sure how to proceed with this issue. Should I add it to the known issues list and close the issue? If I had a fix that worked across many or all editors that would be the first choice, but I am not sure if such a fix exists.
from b2_fuse.
As “cat” command works fine (which is actually the case) I would not bother with this very minor issue. It is not worth spending more time with it.
Perhaps, as a future enhancement, it would be good that the content of .sha1 file had the same format as the sha1sum.txt generated by Kleopatra program:
<hash_sum_of_the_file> <full_path_of_the_file>
But this would be a very low priority enhancement IMO.
Yes, perhaps it is a good idea to close this and leave it as a minor known issue.
from b2_fuse.
Is there are a reason why it should be the same format as sha1sum? Does it simplify something?
I can easily (one line fix) include the name of the file in the content. Changing the name of the hash file will require significant changes though.
from b2_fuse.
Just for a more easy way to compare and verify that everything is OK. A user script or third party program might more easily check that the output of sha1sum and the content of the .sha1 file are exactly the same in a more easy way. But that is not important at all; that comparison can already be made betwen the first 40 characters of sha1sum output and the “cat“ command output of .sha1 file. You might forget about this.
from b2_fuse.
Alright. Lets keep it as it is then. Thanks for the feedback, adding this to known issues and closing.
from b2_fuse.
Related Issues (20)
- Mounting squashfs image via b2_fuse causes entire file download HOT 4
- Adding support for "mtime" using extended file metadata HOT 1
- Only first 100 files in alphabetical order can be seen HOT 3
- Cannot create file or directory with filename that is a suffix of the filename of an existing file HOT 2
- Cannot remove directory with filename that is a prefix of an existing filename HOT 1
- Purge or Refresh the Cache for a File HOT 16
- tput in start_script HOT 1
- only one file being displayed in b2fuse after a 'b2 sync' HOT 3
- When attempting to mount error occurs HOT 2
- NotImplementedType thrown when using encfs HOT 7
- cannot mount bucket HOT 2
- Add support for Python3 HOT 1
- KeyError: 'contentLength' HOT 2
- mountpoint is not empty HOT 7
- 'NoneType' object has no attribute '__getitem__' HOT 4
- Error: unauthorized (first run) Everything is installed/configured perfectly HOT 5
- Does this project still work? HOT 4
- `pip install b2fuse` fails on ubuntu focal 20.04 HOT 4
- error after install HOT 2
- ModuleNotFoundError: No module named 'b2fuse_main'
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 b2_fuse.