Robert-Stackflow / CloudOTP

This is an awesome two-factor authenticator based on Flutter for Android and Windows which supports cloud backup.基于 Flutter 的双因素验证器,支持Android和Windows平台,支持云备份。
https://apps.cloudchewie.com/cloudotp
GNU General Public License v3.0
46 stars 3 forks source link

linux: put the application data into $XDG_DATA_HOME #21

Closed pugaizai closed 3 days ago

pugaizai commented 4 days ago

现在修改后的 linux 下的数据会存放在 $HOME/.local/share/CloudOTP

Robert-Stackflow commented 4 days ago

support目录获取到的包含CloudOTP吗?Linux下获取到的appName好像总是小写的cloudotp

pugaizai commented 4 days ago

support目录获取到的包含CloudOTP吗?

yep

Robert-Stackflow commented 4 days ago

OK,我之后测试下Windows和其他平台下获取support目录包含不包含CloudOTP

pugaizai commented 4 days ago

windows的 support 目录在

  @override
  Future<String?> getApplicationSupportPath() =>
      _createApplicationSubdirectory(WindowsKnownFolder.RoamingAppData);

所以是包含的

documents 目录倒是不会

  @override
  Future<String?> getApplicationDocumentsPath() =>
      getPath(WindowsKnownFolder.Documents);

以上是path_provider包的源码

pugaizai commented 4 days ago

要把其他平台也改成getApplicationSupportPath吗?我现在倒是方便改

Robert-Stackflow commented 4 days ago

先一并改了吧,之后我再添加迁移数据的逻辑

pugaizai commented 4 days ago

才发现之前的目录在安卓中是完全找不到的

Robert-Stackflow commented 4 days ago

安卓是在软件内部存储里

Robert-Stackflow commented 3 days ago

你是格式化了一下代码吗?我看改了很多文件,这个metainfo文件是用来做什么的,发布到flathub吗?

pugaizai commented 3 days ago

发布到flathub吗?

这个metainfo文件主要是你在linux上打开软件商店能看到具体信息,上不上flathub无所谓,主要看你

你是格式化了一下代码吗?

运行了 dart format . 之后的结果,我看了下都是些空格。

Robert-Stackflow commented 3 days ago

感谢感谢,我之前还奇怪用应用商店打开deb那些元信息没展示出来