diff --git a/src/support/File.cpp b/src/support/File.cpp index e8acdce..8d0e8d5 100644 --- a/src/support/File.cpp +++ b/src/support/File.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -156,6 +157,14 @@ File::CanWrite(BStatable* file) if(file == nullptr) return false; + BVolume volume; + if(file->GetVolume(&volume) < B_OK) { + return false; + } + if(volume.IsReadOnly()) { + return false; + } + mode_t permissions; if(file->GetPermissions(&permissions) < B_OK) { return false;