circuitpython/shared-module
Noralf Trønnes 28383afa11 shared-module/os: Fix os.mkdir('a/b')
This fixes commit a99f9427420d("'/' and '\' are also acceptable ends of the path now") which broke mkdir.
The problem is where the directory name is a single letter like this:
>>> os.mkdir('a')
>>> os.mkdir('a/b')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 17] File exists
>>> os.mkdir('a/bb')
>>>

I wasn't smart enough to fix this in the oofatfs library, so I did it in the os shared module by
creating a path lookup function for the os methods that only deals with directories. I reverted
the library change introduced by the aforementioned commit.

This means that os.stat and os.rename can't handle trailing slashes. This is to avoid allowing
filenames with trailing slashes to pass through. In order to handle trailing slashes for these
it would be necessary to check if it really is a directory before stripping. I didn't do this
since the original issue was to make os.chdir tolerate trailing slashes.

There's an open MicroPython issue #2929 wrt. trailing slashes and mkdir.
2018-11-09 19:20:56 +01:00
..
_stage _stage: use 16 bit for coordinates to support larger screens 2018-03-11 12:07:23 +01:00
audioio add channels and bits_per_sample to audioio.WaveFile 2018-10-31 18:08:10 -07:00
bitbangio Support internationalisation. 2018-08-07 14:58:57 -07:00
bleio bleio: Remove redundant struct field 2018-10-21 15:59:46 +02:00
busio add timeout keyword to I2C - for bitbangio - ignored for busio 2018-05-13 21:54:44 -04:00
displayio Introduce audioio.Mixer which can mix multiple audio samples 2018-10-05 15:12:23 -07:00
gamepad Add gamepad_singleton to root pointers 2018-05-30 23:11:22 +02:00
multiterminal Merge tag 'v1.9.3' 2017-11-02 12:41:50 -07:00
network fixup 2018-10-16 23:09:55 +11:00
os shared-module/os: Fix os.mkdir('a/b') 2018-11-09 19:20:56 +01:00
random Introduce a random module that is a subset of CPython's random. It 2017-06-27 17:37:24 -07:00
socket modify modnetwork and modusocket for circuitpython 2018-10-04 22:02:25 +10:00
storage allow '/' to be mounted on '/' from Python code 2018-06-21 09:24:40 -04:00
struct Support internationalisation. 2018-08-07 14:58:57 -07:00
uheap uheap: Switch to using gc_nbytes to measure allcoation size so we stop undercounting. 2016-11-23 17:32:50 -08:00
ustack Measure and report maximum stack usage. (#175) 2017-07-23 15:32:05 -04:00
wiznet Add "dhcp" property to turn DHCP on and off 2018-10-25 11:29:27 +11:00