git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edit: create missing directories on save
[minimedit.git]
/
edit.php
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;
}
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");
if (!file_put_contents($filename, $upload))
abort('500 save error', "fout bij schrijven van $filename");