das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

FileSystem API doesn't like colons in filenames #113

Closed jbfaden closed 1 month ago

jbfaden commented 2 months ago

It was a few years ago when I noticed that files read by Autoplot using the FileSystem API cannot contain colons.

This script demos:

from org.das2.util.filesystem import FileSystem
fs= FileSystem.create('https://space.physics.uiowa.edu/~jbf/juno/u/bill/20200110/')
ff= fs.listDirectory('')

afile=None
for f in ff:
    if f.find(':')>-1:
        afile= f
        break

print afile
fo= fs.getFileObject(afile)
fi= fo.getFile()

print fi
jbfaden commented 2 months ago

This shows the bug:

https://github.com/autoplot/dev/blob/master/bugs/ghdas2/0113/demoBug0113.jy

I'm having an awful time getting this to work properly, though this script is working now. I'll have to see what breaks. It looks as though I can plot individual files, but something with aggregation doesn't work.

jbfaden commented 1 month ago

We resolved at a Juno meeting that colons cannot be allowed, because they won't work on Windows. They will still be escaped properly and now work on Linux and Mac, but they should be avoided.