Re: [Vala] file.copy problem



I guess it is a problem of GIO on Windows. 

You can catch the error with

try {
...
} catch(IOError.EXISTS e) {
// trash the old file and copy again.
....
}


- Yu
On Mon, 2009-06-01 at 10:12 +0200, Joss 4 wrote:
oops, sorry , I  forgot part of the error line...

Hi,

I have got this problem on file.copy function using valide 4.0 on windows.

this is the code :
. . . .
test.copy (destBkup, FileCopyFlags.OVERWRITE, null, null);  // create 
backup
. . . .

When I launch the program I got this warning :

Progetti_VALA/PetBeGone/main.vala.c: line 622: uncaught error: Error 
opening file. 'F:/Progetti_VALA\packages\TESTLIST_BAK': File exists

this error stop the execution. I mean the lines below the test.copy are 
not executed.

I think this shouldn't be because I set  FileCopyFlags.OVERWRITE. Am I 
wrong ?

_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]