Re: Permision Denaied with Gio::File::copy()
- From: Filipe Apostolo <f apostolo cbr gmail com>
- To: GTKmm List <gtkmm-list gnome org>
- Subject: Re: Permision Denaied with Gio::File::copy()
- Date: Wed, 26 Jan 2011 15:39:25 +0000
It's read only.
Povietkin Konstantin wrote:
> What is the directory's permissions after "make_directory" has
> completed?
> В Срд, 26/01/2011 в 12:30 +0000, Filipe Apostolo пишет:
>
>> Hi every one,
>>
>> I'm tring to build a Gtkmm Application for a windows Xp OS which will
>> allow, to the user, install some selected files to a specific directory.
>>
>> The user selects a File using Gtk::FileChooserDialog, then the
>> application will copy it to a specific directory which the application
>> searches in WindowsRegistry.
>>
>> If the directory does not exists the application will create it:
>>
>>
>> ----- Code---
>> try
>> {
>> Glib::RefPtr<Gio::File> fromFile =
>> Gio::File::create_for_path(fileDialog.get_filename ());
>> Glib::RefPtr<Gio::File> toDirectory =
>> Gio::File::create_for_path(licenceFilePath);
>>
>> Glib::RefPtr<Gio::File> toFile =
>> Gio::File::create_for_path(licenceFilePath + nameOfFile);
>>
>>
>>
>>
>> if (!toDirectory->query_exists ())
>> {
>> toDirectory->make_directory ();
>>
>> }
>>
>> fromFile->copy(toFile);
>>
>> }
>> catch(const Glib::Exception& ex)
>> {
>> std::cout << "Exception ocurred: " << ex.what() << std::endl;
>> }
>>
>> The code fails catching the following exception : Permision Denied;
>>
>> I went to the directory And the Read-Only check box was cheked. I
>> unchecked and tryied again and the file was successfuly copied.
>>
>> 1- How can i force to copy the file with the Red-Only option?
>> 2- How can I create the directory without the Read-Only Active (The
>> folder created with make_dir has the Read-Only active)
>> 3- I sow that All folders in windows have this flag active, this means
>> that if question 1 has no solution I cant create files?
>>
>>
>> Thanks,
>> Filipe
>>
>>
>>
>> _______________________________________________
>> gtkmm-list mailing list
>> gtkmm-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>>
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]