Skip to content

Instantly share code, notes, and snippets.

@ao-kenji
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save ao-kenji/41f39cea1d5e9e599f3f to your computer and use it in GitHub Desktop.

Select an option

Save ao-kenji/41f39cea1d5e9e599f3f to your computer and use it in GitHub Desktop.
[Merged into original tree] Small patch for sayaka (https://github.com/isaki68k/sayaka/) on OpenBSD; find(1) in OpenBSD does not have -delete option.
diff --git a/sayaka.php b/sayaka.php
index 4029859..d414dd4 100644
--- a/sayaka.php
+++ b/sayaka.php
@@ -697,10 +697,10 @@ function invalidate_cache()
global $cachedir;
// アイコンは7日分くらいか
- system("find {$cachedir} -atime +7 -delete");
+ system("find {$cachedir} -atime +7 -exec rm {} +");
// 写真は24時間分くらいか
- system("find {$cachedir} -atime +1 -delete");
+ system("find {$cachedir} -atime +1 -exec rm {} +");
}
// UTF-8 文字列を分割する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment