commit 491037243c7458ed5df337229e26e23cca00adc9
Author: Przemysław Buczkowski <przemub@yahoo.pl>
Date: Mon Oct 8 17:30:16 2012 +0200
Create a download directory after its change in Web+
It prevents crash due to non-existence of a download folder.
Signed-off-by: Przemysław Buczkowski <przemub@yahoo.pl>
diff --git a/src/apps/webpositive/DownloadWindow.cpp b/src/apps/webpositive/DownloadWindow.cpp
index dee9867..b7fd5b0 100644
a
|
b
|
|
33 | 33 | #include <Button.h> |
34 | 34 | #include <Catalog.h> |
35 | 35 | #include <ControlLook.h> |
| 36 | #include <Directory.h> |
36 | 37 | #include <Entry.h> |
37 | 38 | #include <File.h> |
38 | 39 | #include <FindDirectory.h> |
… |
… |
DownloadWindow::MessageReceived(BMessage* message)
|
309 | 310 | && string == kSettingsKeyDownloadPath |
310 | 311 | && message->FindString("value", &string) == B_OK) { |
311 | 312 | fDownloadPath = string; |
| 313 | |
| 314 | // Create a directory if it does not exist |
| 315 | BDirectory directory; |
| 316 | directory.CreateDirectory(fDownloadPath, NULL); |
312 | 317 | } |
313 | 318 | break; |
314 | 319 | } |