[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Chris Lovett

New submission from Chris Lovett:

When I walk a directory recursively, it is tacking on an additional 
non-existant file from one of the subdirectories.  Here's the code:

def copy_dir(self, src, dest):
result = sftp.mkdir(dest)
for dirname, dirnames, filenames in os.walk(src):
for subdirname in dirnames:
print("entering dir:" + subdirname)
self.copy_dir(os.path.join(src, subdirname), os.path.join(dest, 
subdirname))
for filename in filenames:
print("copying:" + filename)

Here's the output:

entering dir:include
copying:CallbackInterface.h
copying:ClockInterface.h
entering dir:tcc
copying:CallbackInterface.tcc
copying:CMakeLists.txt
copying:darknet.i
copying:darknet.i.h
copying:darknet.obj
copying:darknet.py
copying:darknetImageNetLabels.txt
copying:darknetPYTHON_wrap.cxx
copying:darknetPYTHON_wrap.h
copying:darknet_config.json
copying:demo.py
copying:demoHelper.py
copying:OpenBLASSetup.cmake
copying:runtest.sh
copying:schoolbus.png
copying:CallbackInterface.h
copying:ClockInterface.h
copying:CallbackInterface.tcc

The last 3 files listed here doesn't exist, they are a repeat of the files 
found in the subdirectories.

--
components: Windows
messages: 300313
nosy: clovett, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.walk has a bug on Windows
type: behavior
versions: Python 3.6

___
Python tracker 
<http://bugs.python.org/issue31214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Chris Lovett

Chris Lovett added the comment:

Oh, my bad then. Apologies for the noise in your system.

--

___
Python tracker 
<http://bugs.python.org/issue31214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com