aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/posix
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-08-30 21:50:21 +0200
committerWillem Jan Palenstijn2016-08-30 21:53:21 +0200
commitfb592a0dbda7b57c38b643e4f04ca9640c6986af (patch)
tree9a2bbe9899e22bbb2ea941938e375826312cee61 /backends/fs/posix
parentd60879b535076f6d513755c918f80b905dd352a9 (diff)
downloadscummvm-rg350-fb592a0dbda7b57c38b643e4f04ca9640c6986af.tar.gz
scummvm-rg350-fb592a0dbda7b57c38b643e4f04ca9640c6986af.tar.bz2
scummvm-rg350-fb592a0dbda7b57c38b643e4f04ca9640c6986af.zip
BACKENDS: Rename variable shadowing function
Diffstat (limited to 'backends/fs/posix')
-rw-r--r--backends/fs/posix/posix-fs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 8597158f4c..746ae6a5a0 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -253,10 +253,10 @@ Common::WriteStream *POSIXFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool POSIXFilesystemNode::create(bool isDirectory) {
+bool POSIXFilesystemNode::create(bool isDir) {
bool success;
- if (isDirectory) {
+ if (isDir) {
success = mkdir(_path.c_str(), 0755) == 0;
} else {
int fd = open(_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0755);
@@ -270,12 +270,12 @@ bool POSIXFilesystemNode::create(bool isDirectory) {
if (success) {
setFlags();
if (_isValid) {
- if (_isDirectory != isDirectory) warning("failed to create %s: got %s", isDirectory ? "directory" : "file", _isDirectory ? "directory" : "file");
- return _isDirectory == isDirectory;
+ if (_isDirectory != isDir) warning("failed to create %s: got %s", isDir ? "directory" : "file", _isDirectory ? "directory" : "file");
+ return _isDirectory == isDir;
}
warning("POSIXFilesystemNode: %s() was a success, but stat indicates there is no such %s",
- isDirectory ? "mkdir" : "creat", isDirectory ? "directory" : "file");
+ isDir ? "mkdir" : "creat", isDir ? "directory" : "file");
return false;
}