Skip to content

Commit

Permalink
fix issue caused by old macOS adding hidden metadata files into the u…
Browse files Browse the repository at this point in the history
…nzipped pdx
  • Loading branch information
jaames committed Apr 17, 2022
1 parent 0d817bf commit eb8283c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Source/noteFs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ function noteFs:getNoteCredits(filepath)
return name, links
end

function noteFs:isValidPpmFilename(s)
return string.sub(s, -4) == '.ppm' and string.sub(s, 1, 2) ~= '._'
end

function noteFs:setWorkingFolder(folderPath)
if folderPath == '/samplememo' and not fs.isdir(folderPath) then
fs.mkdir(folderPath)
Expand All @@ -230,9 +234,9 @@ function noteFs:setWorkingFolder(folderPath)
self.workingFolder = folderPath
noteList = {}
local list = fs.listFiles(folderPath)
for _, name in pairs(list) do
if string.sub(name, -3) == 'ppm' then
table.insert(noteList, folderPath .. name)
for _, filename in pairs(list) do
if noteFs:isValidPpmFilename(filename) then
table.insert(noteList, folderPath .. filename)
end
end
numNotes = #noteList
Expand Down
4 changes: 2 additions & 2 deletions Source/pdxinfo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name=Playnote Studio
author=James Daniel
description=Flipnote Studio animation player for the Playdate
bundleID=com.jaames.playnote
version=1.0
buildNumber=1
version=1.0.1
buildNumber=2
imagePath=gfx/launcher
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ if [ $CMD == "build" ]; then
find ./${GAME} -name "*.dll" -type f -delete
# cleapup empty directories
find ./${GAME} -empty -type d -delete
# cleanup macOS extended attribute files
find . -type f -name '._*' -delete
# zip result, skipping pesky DS_Store files
rm ./${GAME}.zip
zip -vr ./${GAME}.zip ./${GAME}/ -x "*.DS_Store"
fi

Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { Icon } from 'astro-icon';
<div class="DownloadCard__head">
<div class="DownloadCard__info">
<h3 class="DownloadCard__title">playnote.pdx</h3>
<div class="DownloadCard__stat">Version 1.0</div>
<div class="DownloadCard__stat">Version 1.0.1</div>
<div class="DownloadCard__stat">17.5 MB</div>
</div>
<div class="DownloadCard__buttons">
Expand Down

0 comments on commit eb8283c

Please sign in to comment.