Comment 1 for bug 317587

Created an attachment (id=265640)
standalone testcase (testme.c)

This bug is originally reported at I have reproduced it on openSUSE-11.1 and SLED11-rc1 as well.

The posix functions (e.g. ftruncate) do not work correctly on files that are mouted over gvfs (e.g. ssh:// or smb:// or sftp://). It breaks to save files.

The problem could be reproduced by a standalone test-case created by Caolan McNamara (Red Hat developer).

Steps to reproduce:

gcc testme.c
cd /tmp
echo test > test.txt
size is 0

(all ok)

cd ~/.gvfs/sftp for somewhere...
echo test > test.txt
size is 5
truncate claimed to work, but file size is still 5
can't open test.txt
: No such file or directory