←back to thread

397 points opengears | 6 comments | | HN request time: 0.205s | source | bottom
1. eternityforest ◴[] No.41897814[source]
If the Catfriend fork goes, I'll have no use for Syncthing at all, and it will be a very sad day in open source. I'll probably move to some proprietary app, since I'm definitely not interested in self hosting anything, and there's not really any FOSS equivalents other than Syncthing itself.

Android really needs to just allow direct file access to any file which is under a user selected folder.

replies(1): >>41897911 #
2. ◴[] No.41898301[source]
3. david_allison ◴[] No.41898520[source]
>> Android really needs to just allow direct file access to any file which is under a user selected folder.

> It does.

No it doesn't, `ACTION_OPEN_DOCUMENT_TREE` provides you with a `DocumentFile`, which isn't a `java.io.File`.

From their docs:

> It offers a simplified view of a tree of documents, but it has substantial overhead

https://developer.android.com/reference/androidx/documentfil...

----

Your fork uses `MANAGE_EXTERNAL_STORAGE` which Google Play heavily restricts:

https://github.com/Catfriend1/syncthing-android/blob/main/ap...

This is very likely the reason that your fork no longer wishes to be on the Play Store:

> Planning to close my Google Play Developer Account. Please say hi if you are interested in obtaining the latest gplay release files from me to help in publishing this app.

https://github.com/Catfriend1/syncthing-android?tab=readme-o...

EDIT: The dangerous permission for `MANAGE_EXTERNAL_STORAGE` doesn't appear in the "App Info", which may be what you're seeing.

replies(1): >>41899594 #
4. iptrz6 ◴[] No.41899594{3}[source]
> No it doesn't, `ACTION_OPEN_DOCUMENT_TREE` provides you with a `DocumentFile`, which isn't a `java.io.File`.

You can call `contentResolver.openFileDescriptor` on a a `content://` Uri from SAF, and get a `ParcelFileDescriptor`, which can be turned into a real unix fd by calling `detach()` on it. Passing this fd into native code just works.

That's not to say that, you know, SAF is actually sane, though. `DocumentFile` lazily IPCs to some StorageProvider process every time you retrieve a property of the file (mtime, size, whatever). There are ways to speed this up by retrieving everything via the lower level `DocumentContract` API, but it definitely feels like it was poorly thought out.

5. NotPractical ◴[] No.41899613[source]
> Take the downvote button away from imbeciles

People that aren't familiar with Android's proprietary labyrinth of a filesystem API, you mean? If you had provided evidence that it does instead of just saying so in your first revision, you probably wouldn't have been downvoted.

6. eredengrin ◴[] No.41899642[source]
>> Android really needs to just allow direct file access to any file which is under a user selected folder.

> It does.

I don't think it does for anything under Android/data/ directory though does it? Which might sound like nitpicking except that there are some apps which only store their data under Android/data with no option to put it elsewhere, which means that there is no way for syncthing to access that data.