git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6bf2e9b
)
edit: create missing directories on save
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 14 Sep 2017 15:41:12 +0000
(17:41 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000
(20:21 +0200)
edit.php
patch
|
blob
|
history
diff --git
a/edit.php
b/edit.php
index 2a63bd2d4f865d1fd1c9dba95689ce40e2a15039..f0d001e9fc6d029d06b24ea49acd147049600f0a 100644
(file)
--- a/
edit.php
+++ b/
edit.php
@@
-34,6
+34,9
@@
if (!strlen($upload)) {
exit;
}
+if (!file_exists(dirname($filename)) and !mkdir(dirname($filename)))
+ abort('500 save error', "fout bij aanmaken van map voor $filename");
+
if (!file_put_contents($filename, $upload))
abort('500 save error', "fout bij schrijven van $filename");