Skip to content

Conversation

@MacTroy
Copy link
Contributor

@MacTroy MacTroy commented Jul 12, 2019

On an APFS volume, writing a resource fork to an existing file using the venerable _PATH_RSRCFORKSPEC (..namedfork/rsrc) shortcut only works if that file already has a resource fork. (?!?!)

Patches lapply with an xattr function that attaches an empty resource fork to the data fork before proceeding.

On an APFS volume, writing a resource fork to an existing file using the venerable _PATH_RSRCFORKSPEC (..namedfork/rsrc) shortcut only works if that file already has a resource fork. (?!?!)

Patches lapply with an xattr function that attaches an empty resource fork to the data fork before proceeding.
@magnusviri
Copy link
Collaborator

Has anyone else tried this?

@sth0
Copy link
Contributor

sth0 commented Dec 29, 2019 via email

@MacTroy
Copy link
Contributor Author

MacTroy commented Dec 30, 2019

I, too, would love to know if anyone else is using this. :)

At our college, this little patch has allowed us to continue using radmind to provide nightly (and on-demand) updates to ~500 lab and classroom Macs which were upgraded to Mojave in August. These are all heavily-used computers that each have between 70 and 100 apps deployed and we’ve had no problems thus far.

@sth0
Copy link
Contributor

sth0 commented Dec 30, 2019 via email

@magnusviri
Copy link
Collaborator

magnusviri commented Dec 30, 2019 via email

@sth0
Copy link
Contributor

sth0 commented Dec 30, 2019 via email

@magnusviri
Copy link
Collaborator

magnusviri commented Dec 30, 2019 via email

@sth0
Copy link
Contributor

sth0 commented Dec 30, 2019 via email

@sth0
Copy link
Contributor

sth0 commented Dec 31, 2019 via email

@tcleamy
Copy link

tcleamy commented Feb 5, 2020

Has anyone else tried this?

We are using the attached patch here at UC Davis. It is working well . We used to see a lot of errors applying transcripts with resource forks and had to try to comment out all those files. Now it just works!

So if you are still looking for feedback before merging the change into the master branch we say go for it.

One quick note. gcc complained since rsrcresult was declared but never used:

  retr.c:433:6: warning: unused variable 'rsrcresult' [-Wunused-variable]
          int rsrcresult = fsetxattr( dfd, XATTR_RESOURCEFORK_NAME, &rsrcvalue,

So it might make sense to do some error checking on the result. Maybe like:

	if ( rsrcresult == -1 ) {
            fprintf( stderr,"%s: Unable to create resource fork %s\n",rsrc_path, strerror( errno ));
	    returnval = -1;
	    goto error2;
	}

@sth0
Copy link
Contributor

sth0 commented Feb 6, 2020 via email

voretaq7 pushed a commit to voretaq7/radmind that referenced this pull request Jun 2, 2021
This is an expanded version of Radmind#331 by MacTroy
via Tim Leamy (@tcleamy)
@magnusviri
Copy link
Collaborator

I'm merging this finally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants