-- 
(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri 
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri 
http://wahoo.no-ip.org        Photo Album: http://wahoo.no-ip.org/gallery2   






On Sunday, April 11, 2021, 3:43:55 PM EDT, Ralf M. <[email protected]> wrote: 





Am 11.04.2021 um 18:45 schrieb paka:
> * Ralf M. <[email protected]> [04-10-21 22:26]:
>> Thanks for testing.
>> Today I had some time to figure out why it works for you but not for me.
>>
>> "darktable -d all" didn't tell me anything (no debug messages at all).
>>
>> Trying out all sorts of combinations I finally found:
>>
>>     Move doesn't move on Windows if
>>     a) the destination directory is on a different drive
>>      AND
>>     b) the image file has the readonly attribute set.
>>
>> dt moves non-ro-images from one drive to another, and moves ro-images within
>> one drive, but the combination doesn't work: The image file is copied to the
>> destination, but the original and the sidecar file stay in the source
>> directory.
>>
>> It's strange as the Windows Explorer happily moves ro-files from one drive
>> to another without even asking for confirmation.

[...]

Hello paka,

> and the action is quite expected
> read-only files may be copied but not removed or executed.
> that is the reason for "read-only"

I'm not talking about access permissions (like Posix rwx or NTFS Access 
Control Lists), but about an attribute that dates back to at least the 
1980s when DOS only knew the FAT file system and all file names where 
8.3. This attribute is still present in all Windows file systems and 
only prevents changes of the file content. It does not hinder file 
rename, moves (even from one filesystem to another) or execution, see 
example session below.

AFAIK Posix doesn't have an equivalent. I think sometimes, when this 
attribute needs to be mapped to a Posix filesystem, it is mapped to r--, 
even though r-- is much more restricitive than the readonly attribute.


> why are you giving read-only permissions to the files?

I set the attribute on my image files because there are some simple 
minded image viewers that change image files without asking and I want 
to prevent them doing so. (One example is the old Windows image viewer, 
it overwrites the file when you rotate the image in the viewer.)


An exmaple terminal session to demonstrate the r attribute:

F:\test>echo some arbitrary text > ro.txt

F:\test>attrib +r ro.txt

F:\test>attrib ro.txt
A    R      F:\test\ro.txt

F:\test>rename ro.txt readonly.txt

F:\test>dir
  Datenträger in Laufwerk F: ist Fast Data
  Volumeseriennummer: BC3F-2127

  Verzeichnis von F:\test

11.04.2021  21:11    <DIR>          .
11.04.2021  21:11    <DIR>          ..
11.04.2021  21:10                22 readonly.txt
                1 Datei(en),            22 Bytes
                2 Verzeichnis(se), 21.418.508.288 Bytes frei

F:\test>move readonly.txt c:\test\r-only.txt
        1 Datei(en) verschoben.

F:\test>dir
  Datenträger in Laufwerk F: ist Fast Data
  Volumeseriennummer: BC3F-2127

  Verzeichnis von F:\test

11.04.2021  21:12    <DIR>          .
11.04.2021  21:12    <DIR>          ..
                0 Datei(en),              0 Bytes
                2 Verzeichnis(se), 21.418.508.288 Bytes frei

F:\test>c:

C:\test>type r-only.txt
some arbitrary text

C:\test>attrib +r wget.exe

C:\test>wget --help
GNU Wget 1.19.1, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...
[... many more lines ...]


sorry, my mis-understanding.  your problem is dealing with a brain-dead 
operating system.
I hope it doesn't affect your longevity.  

I must say I did experiment some with windows 2.99 but returned to cp/m.  
yes, I am aged :)

--
(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri 
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri 
http://wahoo.no-ip.org        Photo Album: http://wahoo.no-ip.org/gallery2  

____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to [email protected]

Reply via email to