Set protection bits

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

Set protection bits

Post by mritter0 »

I was doing some testing of setting a file's protection bits.

Workbench does not set the bits for the .info file when it does for the file. As an example, if you were backing up a drawer and setting the Archive bit to show the file was backed up, wouldn't you also do the .info file (so don't lose any changed tooltypes). You would think the program would do it for you, so why doesn't Workbench?

Same if you remove the Delete bit, Workbench doesn't apply it to the .info. Why not? I would hate to lose an icon (if deleted with a file browser) with a bunch of editted tooltypes (like MultiView/MultiEdit).

In my program Workbench Explorer I have been setting the .info to match it's owner. Yes or no?
Workbench Explorer - A better way to browse drawers
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Set protection bits

Post by broadblues »

Workbench does not set the bits for the .info file when it does for the file. As an example, if you were backing up a drawer and setting the Archive bit to show the file was backed up, wouldn't you also do the .info file (so don't lose any changed tooltypes). You would think the program would do it for you, so why doesn't Workbench?
Generally an archiver would copy files seperately and deal the icons as distinct files. Setting the archive bit by hand isn't generally the way it works.
Same if you remove the Delete bit, Workbench doesn't apply it to the .info. Why not? I would hate to lose an icon (if deleted with a file browser) with a bunch of editted tooltypes (like MultiView/MultiEdit).
Workbench doesn't operate on icons seperatly, so workbench will never delete the icon of a file with the delete bit set.
In my program Workbench Explorer I have been setting the .info to match it's owner. Yes or no?

Definetly no.

They are seperate files so should not (automaticaly) have the same protection bits.

For example an icon is not executable so should never have the e bit set, nor the s bit.

Another example if for some reason you clear the read bit on a file, if you mimiced that in the icon it would become unreadable and you'd never be able to change the protection again (without resorting the shell that is).
User avatar
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

Re: Set protection bits

Post by mritter0 »

I disabled setting the icon's bit. That's what I was seeing Workbench do.....second opinions always help.
Workbench Explorer - A better way to browse drawers
Post Reply