nabil6391 / flutter_download_manager

Flutter Download Manager is a Cross-Platform file downloader with resumeable, parallel and batch Download support. Also be notified of download status and progress updates
MIT License
46 stars 29 forks source link

Add Platform.pathSeparator instead putting "/" when building the directory. #5

Closed ortolanph closed 2 years ago

ortolanph commented 2 years ago

At the downloader.dart file, on the addDownload method there is a / hardcoded. Suggestion to replace by Platform.pathSeparator, because of Windows systems (yeah... you know, multiplatform stuff).

      var downloadFilename = isDirectory
          ? savedDir + Platform.pathSeparator + getFileNameFromUrl(url)
          : savedDir;
nabil6391 commented 2 years ago

Good Suggestion!, I will try to fix that up. I dont mind a PR as well.

ortolanph commented 2 years ago

I can do it... Soon there will be a PR for you.

ortolanph commented 2 years ago

Fix done and created a PR. Thanks for allowing me to help with something! Please check my PR.