diff --git a/build/m4/banshee/dap-mtp.m4 b/build/m4/banshee/dap-mtp.m4
index 0721b92..3d3f8e4 100644
--- a/build/m4/banshee/dap-mtp.m4
+++ b/build/m4/banshee/dap-mtp.m4
@@ -21,10 +21,12 @@ AC_DEFUN([BANSHEE_CHECK_DAP_MTP],
                                LIBMTP_HAS_MODDATE=yes,
                                LIBMTP_HAS_MODDATE=no,
                                [[#include <libmtp.h>]])
+               AC_COMPUTE_INT([LIBMTP_HAS_FOLDER], [LIBMTP_FILETYPE_WAV], [#include <libmtp.h>], LIBMTP_HAS_FOLDER=)
        fi
 
        AM_CONDITIONAL(ENABLE_MTP, test "x$enable_libmtp" = "xyes")
        AM_CONDITIONAL(LIBMTP_TRACK_STRUCT_HAS_MODDATE, [test "$LIBMTP_HAS_MODDATE" = "yes"])
+       AM_CONDITIONAL(LIBMTP_FILETYPE_ENUM_HAS_FOLDER, [test "$LIBMTP_HAS_FOLDER" = "1"])
        AC_CHECK_SIZEOF(time_t)
        AM_CONDITIONAL(LIBMTP_SIZEOF_TIME_T_64, [test "x$ac_cv_sizeof_time_t" = "x8"])
 ])
diff --git a/src/Libraries/Mtp/Mtp/FileType.cs b/src/Libraries/Mtp/Mtp/FileType.cs
index bfb2dcf..9a0ab6d 100644
--- a/src/Libraries/Mtp/Mtp/FileType.cs
+++ b/src/Libraries/Mtp/Mtp/FileType.cs
@@ -33,6 +33,9 @@ namespace Mtp
 {
     public enum FileType
     {
+#if LIBMTP_FILETYPE_HAS_FOLDER
+        FOLDER,
+#endif
         WAV,
         MP3,
         WMA,
