-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overpass query failes writing to a public directory #167
Comments
private boolean createDocumentNoException(String mimeType) {
try {
return DocumentsContract.createDocument(
resolver,
uris.getParent(),
mimeType,
getName()) != null;
} catch (Exception e) {
return false;
}
} Document is public static String fromName(String name) {
String suffix = getSuffix(name);
if ("gpx".equals(suffix)) {
return "application/gpx+xml";
} else if ("osm".equals(suffix) || "xml".equals(suffix)) {
return "application/xml";
} else if ("png".equals(suffix)) {
return "image/png";
} else if ("zip".equals(suffix)) {
return "application/zip";
}
return "text/plain";
} So then Android changes the file name to I think one workaround is to save overpass results as |
bailuk
added a commit
that referenced
this issue
Sep 10, 2024
…to prevent renaming of file by Android SAF backend
bailuk
added a commit
that referenced
this issue
Oct 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
concerning v1.26 (40) from f-droid, on an android 13 phone; overpass-queries:
I encounter problems if I change the folder for the internal data to the former ~/aat_data folder:
If I use the restricted /data/data/ch.bailu.aat/files everything works fine - but I don't have access to the files for further use.
If I change the folder for internal files to primary:aat_data (via "Auswählen (SAF)..." and giving read and write access) the the overpass-query fails: I get the red status message #
GET '....': failed°
Interestingly the nominatim query works with both settings, also the saving of tiles and gpx tracks works properly.
Contents of aat_data/query/nominatim with just one xml-file.
-rw-r--r-- 1 owner group 9 Sep 03 10:28 edit.txt
-rw-r--r-- 1 owner group 1257 Sep 03 10:28 nominatim.xml
-rw-r--r-- 1 owner group 9 Sep 03 10:28 query.txt
Contents of aat_data/query/overpass with newly created xml-files every try:
-rw-r--r-- 1 owner group 19 Sep 03 10:30 edit.txt
-rw-r--r-- 1 owner group 0 Aug 24 14:28 overpass.osm (1).xml
-rw-r--r-- 1 owner group 0 Aug 24 14:28 overpass.osm (2).xml
-rw-r--r-- 1 owner group 0 Aug 24 14:29 overpass.osm (3).xml
-rw-r--r-- 1 owner group 0 Aug 30 10:56 overpass.osm (4).xml
-rw-r--r-- 1 owner group 0 Sep 03 10:23 overpass.osm (5).xml
-rw-r--r-- 1 owner group 0 Sep 03 10:28 overpass.osm (6).xml
-rw-r--r-- 1 owner group 0 Aug 24 14:18 overpass.osm.xml
-rw-r--r-- 1 owner group 19 Sep 03 10:28 query.txt
(same behaviour if I delete all xml files: After that I have the same reaction with the empty overpass.osm.xml-file)
It looks to me very strongly like an issue in access rights or path names at some point.
Maybe it has something to do with issue #164, especially the problem described by @Xanatos00 in #164 (comment)
The text was updated successfully, but these errors were encountered: