diff options
author | Arkadiusz MiĆkiewicz | 2009-12-29 09:44:08 (GMT) |
---|---|---|
committer | cvs2git | 2012-11-29 22:58:16 (GMT) |
commit | 9654851fb44e079639c67f6aac4b8eb75dc83cee (patch) | |
tree | 7248ca201dca2b53b51648a53fd21c4a9064217d | |
parent | 2fcadf85f5cb504e22ebb4545720d0e949750ba4 (diff) | |
download | distfiles-9654851fb44e079639c67f6aac4b8eb75dc83cee.zip distfiles-9654851fb44e079639c67f6aac4b8eb75dc83cee.tar.gz |
Back to original dir (works even if tmp is a symlink)
Changed files:
request-handler.pl -> 1.21
-rw-r--r-- | request-handler.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/request-handler.pl b/request-handler.pl index 4904aae..5c92667 100644 --- a/request-handler.pl +++ b/request-handler.pl @@ -12,6 +12,7 @@ $flags = ""; # --------------------------------------------------------------- use File::Basename; +use Cwd; sub cleanup() { @@ -61,6 +62,8 @@ die "ill-formed request" if (!defined $from); report_fatal("bad spec name") if (!defined $spec); +$cwd = Cwd::getcwd(); + mkdir("tmp/$id") or die("cannot create: tmp/$id"); chdir("tmp/$id"); @@ -73,7 +76,7 @@ if (system("cvs -d :pserver:cvs\@cvs.pld-linux.org:/cvsroot get $branch \"packag report_fatal("cannot cvs get $spec at $branch") } -chdir("../.."); +chdir($cwd); open(S, "> tmp/$id/to-spool"); print S "$from\@pld-linux.org\n"; |