Question On Mac, is it specifically Finder that messes up the archive flag?

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by hippy dave, Jul 4, 2018.

  1. CTCaer

    CTCaer GBAtemp Advanced Fan

    Member
    9
    Mar 22, 2008
    Greece
    Hekate and fusee use FatFs and do not care at all for this bit (which is the normal behavior).

    ftpd/hbmenu and many other work only with this unset. There are cases where Retroarch breaks if it's unset. So it wants it set for retroarch folder.
    All of it falls in the Horizon's filesystem driver and content management (fs and ncm/ns).

    Maybe a version of libnx can be produced that manages this and stops the automatic usage of archive bit by Horizon for homebrew.


    Btw, backing up your sd card or migrating to a new one, fucks with this in windows and any other platform that does not copy pastes the attributes as is..
    (Which is the most used platform.)

    For me, the first time I migrated, it broke all my games and album photos/videos. Because the arc bit was set to all of them.
    Because I don't like methods like formatting and re-downloading everything, I researched a bit and found out around august/October that the fault is the archive bit.
    I unset it and this fixed my games and album "magically".
     
    hippy dave likes this.
  2. hippy dave
    OP

    hippy dave BBMB

    Member
    11
    Apr 30, 2012
    United Kingdom
    Maybe backing up/migrating with an archiver (rar etc) would be safe, tho check the settings to make sure everything is preserved.

    Yeah the homebrew situation sounds messy, I hope someone can come up with a good solution.
     
  3. CTCaer

    CTCaer GBAtemp Advanced Fan

    Member
    9
    Mar 22, 2008
    Greece
    Yeah taring/raring/7zipping/zipping. But they must be configured first, to keep the attributes as is when archiving and when extracting.
     
    hippy dave likes this.
  4. morrison22

    morrison22 GBAtemp Fan

    Member
    5
    Nov 26, 2005
    United States
    My Micro SD Card is called SDCARD
    After moving files via Finder to the SDCARD, I open Terminal and type:
    sudo chflags -R arch /Volumes/SDCARD and press enter and the cursor goes to the next line.
    Then I type:
    dot_clean -f /Volumes/SDCARD and press enter and the cursor goes to the next line.
    Then I eject the SDCARD and put it in the switch.

    When I use FTPd, I can see that the dot files are still present in all of the folders in the SDCARD, so it didn't actually remove them. Anyone know why? Am I typing the command wrong?

    Also how can I manually check if I set the archive flag?
     
    Last edited by morrison22, Jul 12, 2018
    Markii likes this.
  5. hippy dave
    OP

    hippy dave BBMB

    Member
    11
    Apr 30, 2012
    United Kingdom
    I haven't used dot_clean, but there are various 3rd party apps you can try - I use one called Hidden Cleaner, you leave it in your Dock, and when you drag a disk to it, it removes the dot files then ejects the disk before MacOS can mess it up again.
     
    morrison22 likes this.
  6. morrison22

    morrison22 GBAtemp Fan

    Member
    5
    Nov 26, 2005
    United States
    I have heard of these cleaners before. I will look into it. But I'm thinking...
    Maybe its because i didn't type "sudo" before typing dot_clean -f /Volumes/SDCARD
     
    hippy dave likes this.
  7. tottti1914

    tottti1914 Member

    Newcomer
    1
    May 3, 2018
    Syria
    so what is the best way to transfer data from macos to switch sd
     
  8. morrison22

    morrison22 GBAtemp Fan

    Member
    5
    Nov 26, 2005
    United States
    tottti1914 likes this.
  9. hippy dave
    OP

    hippy dave BBMB

    Member
    11
    Apr 30, 2012
    United Kingdom
    I've just found that the -p flag stops cp from setting the archive flag (it preserves flags, so as long as it wasn't already set on the source file for some reason). I was using it with -X to not copy extended attributes/resource forks, also -R to recurse subdirectories, eg:

    cp -XpR * /Volumes/Switch200/


    e: also,

    ls -aOl

    (little a big oh little el - just remember AOL the shitty online service if you're old enough, and only the O is capital)
    will show a column for flags, look out for arch.

    and

    sudo chflags noarch <file>

    unsets the flag. Can use

    sudo chflags -R noarch <dir>

    to recurse.

    I didn't try it without sudo, might work.
     
    Last edited by hippy dave, Jul 17, 2018 at 6:32 PM
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice