Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] TempPath is no longer respected #7996

Closed
2 tasks done
chrisb-github opened this issue Dec 9, 2022 · 13 comments
Closed
2 tasks done

[Bug] TempPath is no longer respected #7996

chrisb-github opened this issue Dec 9, 2022 · 13 comments
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Missing: feedback If feedback is requested Packaging/building Related to building, compiling or packaging FreeCAD Regression Bugs describing a regression or PRs fixing one

Comments

@chrisb-github
Copy link
Contributor

chrisb-github commented Dec 9, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Forums discussion

https://forum.freecadweb.org/viewtopic.php?f=3&t=73868

Version

0.21 (Development)

Full version info

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.31155 (Git)
Build type: Release
Branch: master
Hash: 6f1b29769b33676edca2bd883b80bed25a0758c8
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * freecad.gears 1.0.0
  * FeedsAndSpeeds 0.4.0
  * fcgear 1.0.0
  * fasteners 0.4.16
  * sheetmetal 0.2.59
  * ExplodedAssembly
  * Curves 0.6.1

Subproject(s) affected?

None

Issue description

The parameter BaseApp→Preferences→General→TempPath is no longer respected. It points to the directory, where the auto recovery files are stored.

How to reproduce:

  • From the menu open Tools>Edit parameters
  • Navigate to BaseApp->Preferences->General.
  • Create a string type with the name TempPath and set it to an existing directory path. Use the expanded path and not ~/
  • Check Preferences->General->Document->Storage->"Save AutoRecovery information every"
  • Set the value of Preferences->General->Document->Storage->"Save AutoRecovery information every" to 2 min
    (- I'm not sure if you have to restart FreeCAD here)
  • Create a new document and add a Cube in Part workbench
  • Watch the directory specified in TempPath

-> Existing behaviour: No backup file appears
-> Expected behaviour: there should appear a backup file in the TempPath. In 0.19 there is a directory created immediately for each file, and after the timeout there are two files inside of that directory, the FreeCAD file itself and an additional xml file

This is a regression. It was still working in

OS: macOS 10.16
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)

It is also not working in 0.20

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: (HEAD detached at 0.20)
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * freecad.gears 1.0.0
  * FeedsAndSpeeds 0.4.0
  * fcgear 1.0.0
  * fasteners 0.4.16
  * sheetmetal 0.2.59
  * ExplodedAssembly
  * Curves 0.6.1

Anything else?

It would be good to know the difference between issues and problems, see https://forum.freecadweb.org/viewtopic.php?p=643735

Code of Conduct

  • I agree to follow this project's Code of Conduct
@chrisb-github chrisb-github added the Regression Bugs describing a regression or PRs fixing one label Dec 9, 2022
@adrianinsaval
Copy link
Member

No need to duplicate as it doesn't really make a difference which template you use, all are issues and end up in the same list, I suggest closing this one.

@luzpaz luzpaz changed the title [Issue] TempPath is no longer respected [Bug] TempPath is no longer respected Dec 19, 2022
@luzpaz
Copy link
Contributor

luzpaz commented Dec 19, 2022

TempPath variable is defined via CMaKe right? @berniev any idea?

@berniev
Copy link
Contributor

berniev commented Dec 19, 2022

Can't do tests at the moment. Any log entries re saving?

@luzpaz
Copy link
Contributor

luzpaz commented Dec 20, 2022

Code reference?

// Change application tmp. directory
std::string tmpPath = _pcUserParamMngr->GetGroup("BaseApp/Preferences/General")->GetASCII("TempPath");
Base::FileInfo di(tmpPath);
if (di.exists() && di.isDir()) {
mConfig["AppTempPath"] = tmpPath + "/";
}

@luzpaz luzpaz added the Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Dec 20, 2022
@adrianinsaval
Copy link
Member

seems this parameter is not used anymore https://forum.freecadweb.org/viewtopic.php?p=649760#p649760
@wwmayer is there any point in having the above code then?

@wwmayer
Copy link
Contributor

wwmayer commented Dec 27, 2022

is there any point in having the above code then?

When using this path for other purposes than the recovery files a user may still want to customize this directory to avoid to delete the files when rebooting the system.

@luzpaz luzpaz added the Packaging/building Related to building, compiling or packaging FreeCAD label Feb 13, 2023
@luzpaz
Copy link
Contributor

luzpaz commented Mar 22, 2023

Whoever tackles this, please also take a look at #7998
TIA!

@luzpaz
Copy link
Contributor

luzpaz commented Apr 11, 2023

bumping for visibility

@adrianinsaval
Copy link
Member

werner mentioned that this is no longer used for auto recovery files: https://forum.freecad.org/viewtopic.php?p=649760#p649760
so this is likely not actually a bug, @PLChris can you confirm?

@luzpaz
Copy link
Contributor

luzpaz commented Apr 15, 2023

@PLChris ping

@luzpaz
Copy link
Contributor

luzpaz commented Nov 14, 2023

Can someone ping chrisb on the forum please ?

@luzpaz
Copy link
Contributor

luzpaz commented Dec 17, 2023

Waiting on @PLChris

@luzpaz luzpaz added the Missing: feedback If feedback is requested label Dec 17, 2023
@adrianinsaval
Copy link
Member

As werner pointed out before, this is not a bug but expected behavior. Transient files are stored in QStandardPaths::GenericCacheLocation which is os dependent. Qt docs says it's these:

Path type mac linux and other unix like windows
GenericCacheLocation "~/Library/Caches" "~/.cache" "C:/Users//AppData/Local/cache"

@adrianinsaval adrianinsaval closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Missing: feedback If feedback is requested Packaging/building Related to building, compiling or packaging FreeCAD Regression Bugs describing a regression or PRs fixing one
Projects
None yet
Development

No branches or pull requests

5 participants