Home Forums Software InstaDMG beware the .plist.plist

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #376392
    knowmad
    Participant

    So many of you probably already know this but… I learned it today. I share this with you so those who have not realized it, or not yet had to know it, can avoid the problem altogether.
    Up until today I have always done my defaults write commands as follows:
    [code]defaults write $3/Library/preferences/com.apple.somepref SpecifcKey -bool NO[/code]
    (depending on who you ask, it should be NO/YES or TRUE/FALSE… I have yet to see it make a real difference… anyone care to correct me?)

    somehow, and I have no idea how, I knew instinctively to leave off the .plist at the end of the file name.

    Today, when trying to get a specific defaults write command to work (issue turned out to be my path… typo-ed it, but managed an actual path all the same… hence the non-error error) I looked closely at what I had typed and said ‘ah, there is the issue, i left off the .plist….. how silly of me’ and added it in…. via a find/replace routine… to every defaults write command in my test script.
    I then noticed, but didn’t really process, my typo and fixed that too.
    I ran my script.

    oy

    just

    oy.

    fixing it wasn’t really tough, but it did create a whole bunch of com.apple.SomeName.plist.plist files, and just as quick (because I did not look at the files, I looked for the results) it created brand new default com.apple.SomeName.plist files to replace the now seemingly missing ones.

    So, make certain to leave the .plist off your path/filename when running (or creating) ‘defaults write’ commands.

    #376395
    larkost
    Participant

    Every now and again I file this as a bug with Apple. The tool should be smart enough to tell the difference, and I can’t think of a case where you would want a .plist.plist file.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed