You are here

PortableApps.com temp folder

21 posts / 0 new
Last post
Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
PortableApps.com temp folder

Is there an official temp folder?
I think OpenOffice uses X:/temp and I think Marko said this was the "official one". Is that the case?

I just want to be sure before I use it with Griffith Portable...

horusofoz
horusofoz's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2008-04-03 22:45
Not sure but may be a safe

Not sure but may be a safe move to start just using X:/PortableApps/CommonFiles/Temp? If there is no obvious issues with this file path probably would be a good location for an official location otherwise users may be surprised to find a folder in the root of their drive which they weren't previously aware of. Oh and looking forward to Griffith. Been using Personal video Database which is plenty good but would like an OSS alternative and one with the PAF setup right. Thanks Simeon = )

PortableApps.com Advocate

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Depends

I'm not aware of a real standard.

For myself, I've done apps which can be waited for with $TEMP\${NAME}Temp, and apps which can't be waited for (e.g. GanttProject Portable, my copy of gVim Portable which I haven't released yet), $EXEDIR\Data\temp is what I've used, as then it doesn't need to be removed.

X:\temp would not be wise. It clutters the root and makes it too easy for the end user to see what they shouldn't and possibly break things.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Yes

ChrisX:\temp would not be wise. It clutters the root and makes it too easy for the end user to see what they shouldn't and possibly break things.

Thats exactly what I thought. I wondered why my root folder got cluttered so I asked Marko. Lets hope for a final word by John.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
Can anybody enlighten me why

Can anybody enlighten me why do you want to avoid the system one?

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Leaving things behind

Some apps leave things behind, that's all. As an example, if one enables spellchecking in gVim and ignores a word, you get various temp files in TEMP (e.g. VIs1234.tmp) which are not deleted on exit. If you use TEMP, there's no way of clearing it. So the way I used to fix it was with creating a subdirectory in TEMP and removing it afterwards. Now, to overcome problems if there are other copies of gvim.exe, I store TEMP things in Data\temp.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
Use GetTempFileName to

Use GetTempFileName to generate unique subdirectory for each copy and you'll be fine.

Producing extra load on pendrives reduces their life and application performance. And still seems to me totally unnecessary.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
No

GetTempFileName isn't enough, as there can be more than one copy of the app running in most cases. In the case of gVim, TEMP usage is minimal (spellchecking and file downloads is all I can think of), but there's really no way to do it other than stick it on the USB drive, and that is also incidentally the most portable solution.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
GetTempFileName isn't enough,

GetTempFileName isn't enough, as there can be more than one copy of the app running

And each will get own temp folder. Where's the problem?

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Share

They need to share it. Also see how secondary launches run - for most apps, one copy of the launcher is preserved, and new instances effectively pass it over to it.

Take my word for it that the current technique is about the best it can be, and GetTempFileName just won't cut it.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
Well, the best would be

Well, the best would be running a single launcher instance for each running installation. That's how I would do it, but really I'm not sure if cutting memory and pendrive usage is worth the effort.
In this case your solution seems fine for me.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
I will check

how intensively Griffith uses the temp folder.
Maybe the wear'n'tear argument has a valid point...

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Most apps local

Most apps will be better off with a local TEMP folder than one on the USB drive; in some cases though you really need to be able to wait for the program but if there may be local copies coexisting with it, not using the portable settings, then you don't want to need to wait for them; that's why I changed gVim Portable.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Griffith

deletes all its temp files on exit so I think its ok to use the local temp folder.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Just be careful

I would expect you to have done a proper job of testing it, but do just make sure that you try unusual things, and things which would be likely to use TEMP locations. Downloading, exporting files to non-native format, installing extensions, things like that often use TEMP things. I'm not sure, but it seems to me possible that in the future we'll be using contained TEMP directories for all apps as a safety measure if nothing else.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
I think you're mixing

I think you're mixing security with paranoia.
Seriously, does it matter that you leave a few KB in the temp folder?
Portable software will never be sneaky anyway. There's 0 security doing own stuff on someone else's computer regardless whether you clean perfectly or not at all.
And from practical standpoint, leaving a few KB once / 10000 sessions, which will be removed during the next disk cleanup anyway is totally insignificant. While durability, reliability and performance degradation is.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Yes

Yes, it does matter. We make sure that nothing is left behind. For example, I may have to go to a lot of trouble in my Inkscape Portable launcher, to remove a meaningless file from ~\gtk-2.0\gtkfilechooser.ini, just because the Inkscape team missed the Export dialogue's Browse button when switching from the GTK file chooser to an OS-specific one. While it's a real pain, it's got to be done.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
I don't see the pain. Windows

I don't see the pain. Windows asks to to clean temp when it's needed, then you remove all unimportant temp files with 2 clicks.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Jimbo
Offline
Last seen: 4 years 11 months ago
Joined: 2007-12-17 05:43
Personal data leakage

One thing that PortableApps.com does claim to do is not leave any personal data behind.

The temp files created by an application can, and often do, include fragments or complete copies of the documents that you have been working with in the application.

For example, you're working with an address book, you reindex, it stores data in the temp folder including all your contact.

I know that this specific application isn't that sensitive, and that the files left behind in this case may not contain personal data, but that isn't the point. The important thing is that data in temp should be dealt with if possible, wherever possible, not just ignored because it doesn't matter this time.

m2
Offline
Last seen: 13 years 10 months ago
Joined: 2006-12-12 12:00
From data security standpoint

From data security standpoint there's no difference whether an app leaves something in very rare cases or never. If the owner wants your data, it's just a matter of installing some spying software, you give your data away the moment you plug your drive. Or, if it's encrypted, the moment you type your password.

"Those people who think they know everything are a great annoyance to those of us who do." Asimov

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Thanks

I haven't tried unusual things but I will. I haven't thought about it too much till now, but Ill test what happens if I export things or crash the programm.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Log in or register to post comments