153 | | B_TRANSLATE("The destination folder does not exist."), |
154 | | B_TRANSLATE("Cancel"), NULL, NULL, |
155 | | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
156 | | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
157 | | alert->Go(); |
158 | | return false; |
| 154 | B_TRANSLATE("Destination folder doesn't exist, create?"), |
| 155 | B_TRANSLATE("Yes"), B_TRANSLATE("No"), NULL, |
| 156 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 157 | alert->SetShortcut(0, B_ESCAPE); |
| 158 | if (alert->Go() == 0) { |
| 159 | if(create_directory(fDestText->Text(), 0755) == B_OK) { |
| 160 | entry.GetRef(&fDestRef); |
| 161 | return true; |
| 162 | } |
| 163 | else { |
| 164 | BAlert* alert = new BAlert("stopAlert", |
| 165 | B_TRANSLATE("Failed to create the destination folder."), |
| 166 | B_TRANSLATE("Cancel"), NULL, NULL, |
| 167 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 168 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
| 169 | alert->Go(); |
| 170 | return false; |
| 171 | } |
| 172 | } else { |
| 173 | BAlert* alert = new BAlert("stopAlert", |
| 174 | B_TRANSLATE("The extraction operation aborted."), |
| 175 | B_TRANSLATE("Cancel"), NULL, NULL, |
| 176 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 177 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
| 178 | alert->Go(); |
| 179 | return false; |
| 180 | } |