add quick/dirty hack to skip read-only dirs when opening a file for writing
authorMark Cannon <vyhdycokio@gmail.com>
Sat, 16 Apr 2011 03:00:24 +0000 (23:00 -0400)
committerMark Cannon <vyhdycokio@gmail.com>
Sat, 16 Apr 2011 03:00:24 +0000 (23:00 -0400)
src/RageFileManager.cpp

index 60fe71f..2013611 100755 (executable)
@@ -849,6 +849,12 @@ RageFileBasic *RageFileManager::OpenForWriting( const CString &sPath, int mode,
        for( unsigned i = 0; i < apDriverList.size(); ++i )
        {
                LoadedDriver &ld = *apDriverList[i];
+
+               // HACK: skip over "dirro". We need to find a more generic
+               // method for this (skipping drivers that cannot write)
+               if( ld.m_sType == "dirro" )
+                       continue;
+
                const CString path = ld.GetPath( sPath );
                if( path.empty() )
                        continue;