View Single Post
Old 05-16-2010, 02:02 PM   #28
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Starson17 View Post
FYI, here's the output of the paths on a failed delete (see my print statements in your code). Separators look Windows OK to me. Note how it hits the path prints, but not the print 'Path exists.' statement inside the path existence test.
That output is a perfect example of the bug I just fixed. Note that the 'prefix' (the path from the drive letter to the directory) is not there. It should be.

The problem came (yet again) because of the mixture of slashes and backslashes in paths. Because the normalized path is frontslashed, a comparison broke and the prefix was not added.
chaley is offline   Reply With Quote