2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-24 16:21:53 +00:00
This commit is contained in:
Philip Sargent 2024-07-13 14:51:19 +02:00
parent cef872d038
commit f874bdc55e

View File

@ -930,17 +930,21 @@ def gpxupload(request, folder=None):
actual_saved.append(saved_filename) actual_saved.append(saved_filename)
filesaved = True filesaved = True
else: # multiple is a list of content else: # multiple is a list of content
for f in multiple: for f in multiple:
try: # crashes in Django os.chmod call if on WSL, but does save file! if gpxvalid(f.name):
saved_filename = fs.save(f.name, content=f) try: # crashes in Django os.chmod call if on WSL, but does save file!
except: saved_filename = fs.save(f.name, content=f)
print( except:
f'\n !! Permissions failure ?! 3 attempting to save "{f.name}" in "{dirpath}" {renameto=}' print(
) f'\n !! Permissions failure ?! 3 attempting to save "{f.name}" in "{dirpath}" {renameto=}'
if "saved_filename" in locals(): )
if saved_filename.is_file(): if "saved_filename" in locals():
actual_saved.append(saved_filename) if saved_filename.is_file():
filesaved = True actual_saved.append(saved_filename)
filesaved = True
else:
print(f"gpxupload(): not a GPX file {f.name=}")
print(f"gpxupload() drop through") print(f"gpxupload() drop through")
files = [] files = []
dirs = [] dirs = []