summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/package.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-09-17 01:53:41 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-09-17 01:56:35 +0200
commite65b29e9f2a9a79731f38787384f9c877eec430f (patch)
treedf729dca05bd679dccf7cc336974e4795099ce47 /crawl-ref/source/package.cc
parent0fac9b0ec9f22978b94594373d65c5a70a4441fd (diff)
downloadcrawl-ref-e65b29e9f2a9a79731f38787384f9c877eec430f.tar.gz
crawl-ref-e65b29e9f2a9a79731f38787384f9c877eec430f.zip
Handle filenames with non-ascii characters.
Only iostreams functions are left; on Windows they don't support Unicode so a workaround will be needed.
Diffstat (limited to 'crawl-ref/source/package.cc')
-rw-r--r--crawl-ref/source/package.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/package.cc b/crawl-ref/source/package.cc
index 37f0a53f6d..ce941d1666 100644
--- a/crawl-ref/source/package.cc
+++ b/crawl-ref/source/package.cc
@@ -97,7 +97,7 @@ package::package(const char* file, bool writeable, bool empty)
if (empty)
{
- fd = open(file, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0666);
+ fd = open_u(file, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0666);
if (fd == -1)
sysfail("can't create save file (%s)", file);
@@ -109,7 +109,7 @@ package::package(const char* file, bool writeable, bool empty)
}
else
{
- fd = open(file, (writeable? O_RDWR : O_RDONLY) | O_BINARY, 0666);
+ fd = open_u(file, (writeable? O_RDWR : O_RDONLY) | O_BINARY, 0666);
if (fd == -1)
sysfail("can't open save file (%s)", file);