Linux desktop Integration: Making cloud and cloudf files non-empty

I’m rolling up my own desktop integration with the Nautilus file manager of Ubuntu / GNOME, and I’m running into a weird limitation of Nautilus (actually “xdg-open”, so it may impact other distros and Linux desktop environments): All files of 0 bytes are always treated a “text/plain” (or “inode/x-empty”), so opening them will always invoke a text editor.

For example, let’s say you run “touch a.xml”, then “xdg-open a.xml” or double-clicking the file on the desktop will open a text editor, whereas with “echo a > a.xml” the web browser (or whatever handles text/xml) will be used.

Now, I wrote some dumb script that periodically runs “echo a >” on all *.cloud or *.cloudf files that are 0 bytes, but this is a clumsy hack, and if you ever want to implement a Linux desktop integration GUI you’ll run into the exact same issue.

So, could there be an option for odrive-agent to automatically insert a dummy single byte of data in every cloud or cloudf file it creates?

2 posts were merged into an existing topic: Modest Request: place holder files on Linux should have some content