Set protection bits

A forum for general AmigaOS 4.x support questions that are not platform-specific

Set protection bits

Postby mritter0 » Thu Mar 08, 2018 3:31 am

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
mritter0
 
Posts: 210
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA

Re: Set protection bits

Postby broadblues » Thu Mar 08, 2018 3:51 am

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
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 534
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Set protection bits

Postby mritter0 » Fri Mar 09, 2018 1:06 am

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
User avatar
mritter0
 
Posts: 210
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA


Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 2 guests