owncloud/core — pull request #753 by DeepDiver1975 (2012-12-06 17:04:31+00:00)
Title: Fixing files external in stable45 - fixes #290

This pull request mainly fixes the status 500 error described in #290

Background:
------------------
the previous opendir call on a file is implemented as a smbclient call:
```
smbclient -N -U 'user%******' -d 0 //server/testsmb -c 'dir "folder/file.txt/*"
```

A Samba server will return NT_STATUS_OBJECT_PATH_NOT_FOUND which returns false on the stream wrapper implementation.
A Windows Server/Workstation will return NT_STATUS_INVALID_PARAMETER which will result in an call to trigger_error() and death :-(

Fix:
-----
According to the stream wrapper documentation a call to filetype() will call stat() on the stream wrapper and interpret the the result correctly.
This has been tested with Windows 7 and Samba 3.4.3