Commons IO
  1. Commons IO
  2. IO-115

FileUtilsCleanDirectoryTestCase fails on Windoes if command chmod is available

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.2
    • Component/s: Utilities
    • Labels:
      None

      Description

      Some tests in FileUtilsCleanDirectoryTestCase try to delete files that have been set to read-only. This is expected to throw an exception. To set the read-only flag the method chmod() tries to execute the unix "chmod" command. If this fails (which should normally be the case on windows), the test is ignored.

      If Posix tools are available e.g. from Cygwin, MKS Toolkit, Microsoft's Posix Tools or similar ones the test fails.

        Activity

        Hide
        Oliver Heger added a comment -

        The problem seems to be fixed in revision 518770 (http://svn.apache.org/viewvc?view=rev&revision=518770). Here the os.name system property is checked to avoid that the affected tests get executed under windows. Don't know if this is the most elegant solution, but it works!

        Show
        Oliver Heger added a comment - The problem seems to be fixed in revision 518770 ( http://svn.apache.org/viewvc?view=rev&revision=518770 ). Here the os.name system property is checked to avoid that the affected tests get executed under windows. Don't know if this is the most elegant solution, but it works!
        Hide
        Jochen Wiedmann added a comment -

        Checking this in was unintentional. My plan was to discuss the issue before actually committing it. However, this issue is of course a good platform to discuss the necessary steps. I am ready to revert the change, if this should be desired. Otherwise, someone else should resove the issue.

        Show
        Jochen Wiedmann added a comment - Checking this in was unintentional. My plan was to discuss the issue before actually committing it. However, this issue is of course a good platform to discuss the necessary steps. I am ready to revert the change, if this should be desired. Otherwise, someone else should resove the issue.
        Hide
        Jochen Wiedmann added a comment -

        After two months without reply, it seems valid to assume that my unintentional change didn'd cause any problems. Closing.

        Show
        Jochen Wiedmann added a comment - After two months without reply, it seems valid to assume that my unintentional change didn'd cause any problems. Closing.

          People

          • Assignee:
            Unassigned
            Reporter:
            Joerg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development