aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/library.xbmc.addon/libXBMC_addon.h1
-rw-r--r--xbmc/addons/AddonCallbacksAddon.cpp17
2 files changed, 5 insertions, 13 deletions
diff --git a/addons/library.xbmc.addon/libXBMC_addon.h b/addons/library.xbmc.addon/libXBMC_addon.h
index ecc2fda733..63bbb84ad2 100644
--- a/addons/library.xbmc.addon/libXBMC_addon.h
+++ b/addons/library.xbmc.addon/libXBMC_addon.h
@@ -26,6 +26,7 @@
#include <stdio.h>
#ifdef _WIN32 // windows
+typedef __int64 int64_t;
#include "dlfcn-win32.h"
#define ADDON_DLL "\\library.xbmc.addon\\libXBMC_addon" ADDON_HELPER_EXT
#define ADDON_HELPER_EXT ".dll"
diff --git a/xbmc/addons/AddonCallbacksAddon.cpp b/xbmc/addons/AddonCallbacksAddon.cpp
index 1b85df9b5c..9c000bdabf 100644
--- a/xbmc/addons/AddonCallbacksAddon.cpp
+++ b/xbmc/addons/AddonCallbacksAddon.cpp
@@ -26,8 +26,9 @@
#include "dialogs/GUIDialogKaiToast.h"
#include "filesystem/File.h"
#include "filesystem/Directory.h"
-#include "filesystem/SMBDirectory.h"
+#include "filesystem/DirectoryFactory.h"
#include "utils/URIUtils.h"
+#include "FileItem.h"
using namespace XFILE;
@@ -432,18 +433,8 @@ bool CAddonCallbacksAddon::CanOpenDirectory(const void* addonData, const char* s
if (!helper)
return false;
- if (CDirectory::Exists(strURL))
- {
- // check permissions
- if (URIUtils::IsSmb(strURL))
- {
- CSMBDirectory directory;
- return directory.Open(CURL(strURL));
- }
-
- return true;
- }
- return false;
+ CFileItemList items;
+ return CDirectory::GetDirectory(strURL, items);
}
}; /* namespace ADDON */