#38 SHFileOperation - support sequence of names


Actually, replace the line

PyErr_Format(PyExc_RuntimeError, "Sequences of names
not yet supported");

in com/win32comext/shell/src/shell.cpp
with useful code.



  • Roger Upole

    Roger Upole - 2006-01-11

    Logged In: YES

    It might actually be easier to just let callers construct
    their own string with filenames separated by NULL's.
    Interestingly, this would work right now except for the
    fact that _tcscpy is used which stops copying characters
    when it finds a NULL byte. So basically, replace tcscpy
    with memcpy and remove the sequence check altogether.
    It'll take longer to put together a test case than it will
    to change the C++ code. Mark, if you're okay with this
    I'll go ahead and do it.

    Alternately, win32api already has code to create a double-
    null terminated sequence of strings for REG_MULTI_SZ. We
    could move it into pywintypes so it's available for
    anyplace else this type of string is used.


  • Mark Hammond

    Mark Hammond - 2006-01-11
    • assigned_to: nobody --> rupole
  • Mark Hammond

    Mark Hammond - 2006-01-11

    Logged In: YES

    Thanks Roger - they both sound fine to me!

  • Roger Upole

    Roger Upole - 2006-01-12

    Logged In: YES

    Rev 1.42 of shell.cpp now allows multiple filenames to be
    passed in as a single string

  • Roger Upole

    Roger Upole - 2006-01-12
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks