String.isFile doesn't like square brackets

Hi all,

a= "~/aFileWith[Brackets].wav"; //pointing to a file that actually exists
File.exists(a) //returns true
a.isFile // returns false

I have tried a few other odd characters (but not extensively) and it’s the only discrepancy I have seen between the two.

I ran into this issue because String.isSoundFile (from wslib) uses .isFile:

	isSoundFile { var sf;
		if( this.isFile )
			{ sf = SoundFile.new;
				if( sf.openRead( this.standardizePath ) )
					{ sf.close; 
						^true }
					{ ^false };
			}
			{ ^false  }
		}

…and thus it rejects any files with square brackets in its name.

Is this a bug? In my standalone app I have now changed .isSoundFile to using File.exists(this) instead. Are there any downsides to this? It seems to be running smoothly querying ~200 soundfiles being loaded from a preset.

Cheers!