[Scummvm-cvs-logs] scummvm master -> 22acfe82d4b870a86ca3f4af2c04ab0ca387cb41
wjp
wjp at usecode.org
Thu Jan 23 18:48:17 CET 2014
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
58aaef33c1 AMIGAOS4: Make isReadable return false for non-existent files
d32816c027 AMIGAOS4: Allow getParent() to work for non-directories
219a68eeda AMIGAOS4: Clarify virtual fs root node
22acfe82d4 Merge pull request #424 from wjp/amigaos4-fs
Commit: 58aaef33c11e4f140c962f96e54a326baa724c0e
https://github.com/scummvm/scummvm/commit/58aaef33c11e4f140c962f96e54a326baa724c0e
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2014-01-22T13:54:05-08:00
Commit Message:
AMIGAOS4: Make isReadable return false for non-existent files
This also properly initializes _bIsValid for non-existent files.
For consistency, isWritable() is changed analogously to isReadable(),
even though it should not lead to changes in behaviour.
Changed paths:
backends/fs/amigaos4/amigaos4-fs.cpp
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 6d713f1..d057830 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -81,6 +81,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
_sDisplayName = ::lastPathComponent(_sPath);
_pFileLock = 0;
_bIsDirectory = false;
+ _bIsValid = false;
// Check whether the node exists and if it is a directory
struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_StringNameInput,_sPath.c_str(),TAG_END);
@@ -332,6 +333,9 @@ AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
}
bool AmigaOSFilesystemNode::isReadable() const {
+ if (!_bIsValid)
+ return false;
+
// Regular RWED protection flags are low-active or inverted, thus the negation.
// moreover pseudo root filesystem (null _pFileLock) is readable whatever the
// protection says
@@ -341,6 +345,9 @@ bool AmigaOSFilesystemNode::isReadable() const {
}
bool AmigaOSFilesystemNode::isWritable() const {
+ if (!_bIsValid)
+ return false;
+
// Regular RWED protection flags are low-active or inverted, thus the negation.
// moreover pseudo root filesystem (null _pFileLock) is never writable whatever
// the protection says (because of the pseudo nature)
Commit: d32816c0279ebf064542dafd1f1b257f0661bd2a
https://github.com/scummvm/scummvm/commit/d32816c0279ebf064542dafd1f1b257f0661bd2a
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2014-01-22T13:54:14-08:00
Commit Message:
AMIGAOS4: Allow getParent() to work for non-directories
Changed paths:
backends/fs/amigaos4/amigaos4-fs.cpp
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index d057830..bd8bf19 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -306,12 +306,6 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
AbstractFSNode *AmigaOSFilesystemNode::getParent() const {
ENTER();
- if (!_bIsDirectory) {
- debug(6, "Not a directory");
- LEAVE();
- return 0;
- }
-
if (_pFileLock == 0) {
debug(6, "Root node");
LEAVE();
Commit: 219a68eeda2c0e14a29f1cfb969dabe3a70e1544
https://github.com/scummvm/scummvm/commit/219a68eeda2c0e14a29f1cfb969dabe3a70e1544
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2014-01-22T14:18:24-08:00
Commit Message:
AMIGAOS4: Clarify virtual fs root node
Changed paths:
backends/fs/amigaos4/amigaos4-fs.h
diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h
index c5ca614..7ce9981 100644
--- a/backends/fs/amigaos4/amigaos4-fs.h
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -43,7 +43,13 @@
*/
class AmigaOSFilesystemNode : public AbstractFSNode {
protected:
+ /**
+ * The main file lock.
+ * If this is NULL but _bIsValid is true, then this Node references
+ * the virtual filesystem root.
+ */
BPTR _pFileLock;
+
Common::String _sDisplayName;
Common::String _sPath;
bool _bIsDirectory;
Commit: 22acfe82d4b870a86ca3f4af2c04ab0ca387cb41
https://github.com/scummvm/scummvm/commit/22acfe82d4b870a86ca3f4af2c04ab0ca387cb41
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2014-01-23T09:47:48-08:00
Commit Message:
Merge pull request #424 from wjp/amigaos4-fs
AMIGAOS4: FSNode fixes
Changed paths:
backends/fs/amigaos4/amigaos4-fs.cpp
backends/fs/amigaos4/amigaos4-fs.h
More information about the Scummvm-git-logs
mailing list