This commit is contained in:
parent
8b4dd0dadc
commit
84b165680b
@ -4,6 +4,7 @@
|
||||
|
||||
import logging
|
||||
import multiprocessing
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -18,6 +19,8 @@ def _copy_file(target: Path, source_file: Path) -> None:
|
||||
logger.debug(f"Copying {source_file} to {target_file}")
|
||||
target_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
target_file.write_bytes(source_file.read_bytes())
|
||||
# preserve file modes
|
||||
shutil.copymode(source_file, target_file)
|
||||
|
||||
|
||||
def copy_files(pool: multiprocessing.Pool, target: Path) -> None:
|
||||
|
@ -92,6 +92,12 @@ if ( !$email ) {
|
||||
print "<p>Please enter your email address!</p>\n";
|
||||
exit;
|
||||
}
|
||||
if ( !$email =~ /^([a-zA-Z][\w\])\@([a-zA-Z0-9.-]+)\.([a-zA-Z]+)/ ) {
|
||||
print "Content-type: text/html\n\n";
|
||||
print "<p>Coult not validate your email address</p>\n";
|
||||
print "<p>Please check your email address!</p>\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
my $items_file = $ENV{"DOCUMENT_ROOT"} . "order/data/items.en.xml";
|
||||
my $items = XML::LibXML->load_xml(location => $items_file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user