xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit ecee062a80ca607be91942347deff00f042f6489

Allow del_tree on a non-existing repository
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-04-06 16:17
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-04-06 16:17
Parent(s): a0ec540e7be1aa620a559c6f77537b9687aacc11
Signing key:
Tree: e7691979c96b679eccfd3ee51057cda9b37c6019
File Lines added Lines deleted
inc/util.inc.php 5 5
File inc/util.inc.php changed (mode: 100644) (index eff4a4f..57b6315)
... ... function rg_del_tree($dst)
1224 1224 global $php_errormsg; global $php_errormsg;
1225 1225
1226 1226 rg_prof_start('del_tree'); rg_prof_start('del_tree');
1227 rg_log_enter('del_tree(' . $dst . ')');
1228 1227
1229 1228 $ret = FALSE; $ret = FALSE;
1230 1229 while (1) { while (1) {
1231 if (!is_dir($dst))
1230 if (!is_dir($dst)) {
1231 $ret = TRUE;
1232 1232 break; break;
1233 }
1233 1234
1234 1235 $d = rg_dir_load($dst); $d = rg_dir_load($dst);
1235 1236 if ($d === FALSE) if ($d === FALSE)
 
... ... function rg_del_tree($dst)
1246 1247 } else { } else {
1247 1248 $r = @unlink($dst . '/' . $obj); $r = @unlink($dst . '/' . $obj);
1248 1249 if ($r !== TRUE) { if ($r !== TRUE) {
1249 rg_log("ERROR: Cannot del file ($php_errormsg).");
1250 rg_log("ERROR: Cannot del file [" . $dst . '/' . $obj . "] ($php_errormsg).");
1250 1251 $err = TRUE; $err = TRUE;
1251 1252 break; break;
1252 1253 } }
 
... ... function rg_del_tree($dst)
1255 1256
1256 1257 $r = @rmdir($dst); $r = @rmdir($dst);
1257 1258 if ($r !== TRUE) { if ($r !== TRUE) {
1258 rg_log("ERROR: Cannot del dir ($php_errormsg).");
1259 rg_log("ERROR: Cannot del dir [" . $dst . "] ($php_errormsg).");
1259 1260 $err = TRUE; $err = TRUE;
1260 1261 break; break;
1261 1262 } }
 
... ... function rg_del_tree($dst)
1265 1266 break; break;
1266 1267 } }
1267 1268
1268 rg_log_exit();
1269 1269 rg_prof_end('del_tree'); rg_prof_end('del_tree');
1270 1270 return $ret; return $ret;
1271 1271 } }
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master