Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-10460

del /S command is not properly implemented in cmd

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.8
    • Shell
    • None

    Description

      Steps to reproduce it:
      Try the following sequence in reactos cmd (running under React OS)

      1) create a directory

      mkdir test

      2) create a subdirectory of it and a file inside it

      cd test
      mkdir subtest
      echo "hola"> testfile.txt

      3) Now run del /s from c:\

      cd c:\
      del /s test

      As you can see in the screenshot, the file testfile.txt is still there!

      According to the documentation in

      https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/del.mspx?mfr=true

      the switch /s "Deletes specified files from the current directory and all subdirectories. Displays the names of the files as they are being deleted. "

      [ It seems that the files should be deleted, but not the directories test and subtest]

      The file /base/shell/cmd/del.c where the del internal command is implemented says:
      "Optimized the recursive deletion in directories." so I guess this should work.
      (The symbol DEL_SUBDIR corresponding to the /S flag appears only 3 times in the source)

      Attachments

        1. del_subdir.patch
          1.0 kB
          cagey45
        2. del-bug.png
          20 kB
          pdenapo
        3. del-bug2.png
          22 kB
          pdenapo

        Issue Links

          Activity

            People

              hbelusca hbelusca
              pdenapo pdenapo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: