~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Alexander Belchenko
  • Date: 2007-11-10 13:16:12 UTC
  • mto: This revision was merged to the branch mainline in revision 3008.
  • Revision ID: bialix@ukr.net-20071110131612-4s55g3rodrp41uwh
Rename on Windows is able to change filename case. (#77740)

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
    On win32, if new exists, it must be moved out of the way first,
341
341
    and then deleted. 
342
342
    """
 
343
    # to change case on win32 you don't need fancy rename
 
344
    if old.lower() == new.lower():
 
345
        os.rename(old,new)
 
346
        return
343
347
    try:
344
348
        fancy_rename(old, new, rename_func=os.rename, unlink_func=os.unlink)
345
349
    except OSError, e: