This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a607b7f9 Fix FtpProviderUserDirTest on Java 8 on Ubuntu. (#779)
2a607b7f9 is described below

commit 2a607b7f9d8c5f66af177eaff05387c27a07e601
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Aug 23 11:10:41 2026 -0400

    Fix FtpProviderUserDirTest on Java 8 on Ubuntu. (#779)
    
    Instead of copying from the mutable target/test-classes/test-data which
    can contain the permission.txt left unreadable by PermissionsTests.
    The homeDirIsRoot tree is still created under getTestDirectory() so the
    embedded FTP server sees the correct location,
    but the data it is seeded with is clean and the Java 8 Ubuntu
    AccessDeniedException:
    target/test-classes/test-data/write-tests/permission.txt
    no longer occurs.
---
 .../org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTest.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTest.java
 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTest.java
index f2932f99f..fde4fbf3f 100644
--- 
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTest.java
+++ 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/FtpProviderUserDirTest.java
@@ -94,8 +94,9 @@ public class FtpProviderUserDirTest extends 
ProviderTestSuiteJunit5 {
         }
 
         // Create test directory structure with homeDirIsRoot
-        final File testDir = new File(getTestDirectory());
-        final File rootDir = new File(testDir, "homeDirIsRoot");
+        // Use src/test/resources/test-data as source to avoid copying files 
modified by permission tests
+        final File testDir = new File("src/test/resources/test-data");
+        final File rootDir = new File(getTestDirectory(), "homeDirIsRoot");
         final File homesDir = new File(rootDir, "home");
         final File initialDir = new File(homesDir, "test");
         FileUtils.deleteDirectory(rootDir);

Reply via email to