]> granicus.if.org Git - transmission/commitdiff
when adding by filename, take local file separators into account
authorJordan Lee <jordan@transmissionbt.com>
Sat, 24 Aug 2013 19:19:45 +0000 (19:19 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sat, 24 Aug 2013 19:19:45 +0000 (19:19 +0000)
qt/add-data.cc

index f52cbf795bfbcceebfcdf71cc7598e4f7842cb15..d7accdf9b00e0740e7691653f5523732e4044c63 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <QFile>
+#include <QDir>
 
 #include <libtransmission/transmission.h>
 #include <libtransmission/utils.h> // tr_base64_encode()
@@ -33,7 +34,7 @@ AddData :: set( const QString& key )
     }
     else if( QFile(key).exists( ) )
     {
-        filename = key;
+        filename = QDir::fromNativeSeparators( key );
         type = FILENAME;
 
         QFile file( key );