Skip to content

[path_provider] getApplicationDocumentsDirectory crashes the app on Windows If Documents is missing #80712

@syleishere

Description

@syleishere

import 'package:path_provider/path_provider.dart';

  Directory config_dir = await getApplicationDocumentsDirectory();
  String config_path = config_dir.path;
  print("Path writeable appears to be $config_path");

If you remove USER/OneDrive/My Documents folder from windows 10, then execute the above as app starts, app will completely crash. Seems to search for USER/OneDrive/My Documents no matter what even if I move it to USER/My Documents to get it off the cloud. This is supposed to be a "secure" path we can write to files, not sure why this is in the cloud on microsoft to begin with with directory, must be a better app directory it can look for for storing sensitive files.

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: desktopRunning on desktopc: fatal crashCrashes that terminate the processfound in release: 2.0Found to occur in 2.0found in release: 2.2Found to occur in 2.2p: path_providerPlugin that provides resolved paths to some platform directoriespackageflutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions