Boris Unckel created IO-701:
-------------------------------

             Summary: PathUtils.setReadOnly do not deal with 
LinuxDosFileAttributeView
                 Key: IO-701
                 URL: https://issues.apache.org/jira/browse/IO-701
             Project: Commons IO
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 2.8.0
         Environment: java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)

cat /etc/fedora-release 
Fedora release 33 (Thirty Three)

uname -a
Linux localhost.localdomain 5.9.16-200.fc33.x86_64 #1 SMP Mon Dec 21 14:08:22 
UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

# /etc/fstab
# Created by anaconda on Sat Aug 29 05:35:21 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/fedora_localhost--live-root /                       ext4    
defaults        1 1
UUID=fd3a2229-bdf5-4fe5-b596-141b9d6c609f /boot                   ext4    
defaults        1 2
UUID=0C7E-FC8E          /boot/efi               vfat    
umask=0077,shortname=winnt 0 2
/dev/mapper/fedora_localhost--live-home /home                   ext4    
defaults        1 2
/dev/mapper/fedora_localhost--live-swap none                    swap    
defaults        0 0

            Reporter: Boris Unckel


PathUtils.setReadOnly use a DosFileAttributeView first. If this fails with a 
Exception, a second try with PosixFileAttributeView will not be done.

The approach is to catch a IOException (java.nio.file.FileSystemException 
Operation not supported), add it to a exception list. Throw the exception list 
if not empty.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to