You are here: PSPad forum > Bug report / Hlášení chyb > Re: Opening a file through FTP overwrites local newer file

Re: Opening a file through FTP overwrites local newer file

#1 Opening a file through FTP overwrites local newer file

Posted by: mgutt | Date: 2015-04-16 08:13 | IP: IP Logged

Not really a bug, its more a missing function in PSPad. It should be showed a warning before opening a file from the FTP if the local in the temp-folder is newer.

Options: Reply | Quote | Up ^


#2 Re: Opening a file through FTP overwrites local newer file

Posted by: pspad | Date: 2015-04-16 11:28 | IP: IP Logged

as you wrote, its temp folder. there shouldn't be "newer" versions of files

Options: Reply | Quote | Up ^


#3 Re: Opening a file through FTP overwrites local newer file

Posted by: mgutt | Date: 2015-04-18 12:35 | IP: IP Logged

The temp folder is the reason why I'm using PSPad. Its a comfortable mirror of my ftp host while working on files.

There is no other way implemented in PSPad. Or do you really think people are copying files from one point to another before editing them? I do not think so.

Options: Reply | Quote | Up ^


#4 Re: Opening a file through FTP overwrites local newer file

Posted by: pspad | Date: 2015-04-18 13:26 | IP: IP Logged

No, but people usually, when they open file via FTP edit this file and save it.
Next time they will open it from FTP again.

Options: Reply | Quote | Up ^


#5 Re: Opening a file through FTP overwrites local newer file

Posted by: Andreas | Date: 2015-04-18 13:43 | IP: IP Logged

mgutt:
Or do you really think people are copying files from one point to another before editing them? I do not think so.

? Maybe you missunderstood something.

Either you work directly on your server with files opened via FTP in PSPad or you work with files opened from your local server without FTP. But never work with files in backup|temp folder.

In both cases you will find some backuped files in backup folders which can be usefull in some data lost situations but without guarantee.

In second case you have to do a remote server update after developing.

I for one directly edit files via FTP. In critical situations I'm working on a remote mirror anyway. Old files found in backup folders often helped me to get back to earlier versions, but you should not rely on that I think. I never copied files before editing them.

@Jan

Quote:
..its temp folder. there shouldn't be "newer" versions of files

In german version this setting topic is called "backup".
1st folder is descriped as "collect copies in"
2nd folder is descriped as "folder for temp FTP files"
In english version topic also is named "backup"
1st folder is descripte as "folder for file backup"
2nd folder is descripte as "backup dir for FTP files"

Now are those folders used for backups which I can rely on or are they only temp folders where I can not rely on?

Options: Reply | Quote | Up ^


#6 Re: Opening a file through FTP overwrites local newer file

Posted by: pspad | Date: 2015-04-18 13:59 | IP: IP Logged

FTP needs to download file first before it can be open in editor. It can be done into anonymous temp file or it can use way I choosed in PSPad - FTP folder keeps folder copy of the FTP server and last version of file (one version, no more backup copies). PSPad save file there and store it to FTP.
Backup folder is used to store previous states of your current file.

I don't know how is it in German translation, cause I am not author of it, I don't speak German.

Options: Reply | Quote | Up ^


#7 Re: Opening a file through FTP overwrites local newer file

Posted by: Andreas | Date: 2015-04-18 15:57 | IP: IP Logged

So I can do both for FTP? Backup with the backup folder (multiple versions) and temp (last version) with second FTP backup folder?

Description of second folder in english should be changed from
"BackUp dir for FTP files (TEMP if empty):"
to
"Temp dir for FTP files (TEMP if empty):"

(I've set both pathes to the same folder as I often search within those files for code snippets.)

Options: Reply | Quote | Up ^


#8 Re: Opening a file through FTP overwrites local newer file

Posted by: mgutt | Date: 2015-04-20 20:26 | IP: IP Logged

Andreas:
Either you work directly on your server with files opened via FTP in PSPad or you work with files opened from your local server without FTP. But never work with files in backup|temp folder.

First task: Open a css file and change one line.

PSPad is able to do that very fast. You open the ftp host, select the file, change the line, save it and its automatically synced with the ftp folder.

Next task: Find all files containing the css class "header"

Now you will use the temp folder to search in, because this will include all recent files.

Last task: Open one of the found files and change a line

Now you double-click the search result entry and... sad the local file is opened (one thing that needs to be changed in PSPad). So you search for the same file on the ftp host, open it and now you double-clikc the search result and it jumps to the needed line. You make you're change, CTRL+S and you're finished.

By that this is the most comfortable way of editing ftp files. I love PSPad because of that (except of the little issue that it opens local temp files instead of the recent ftp version). I know PSPad calls it a "temp" folder, but I think most people use it as a project folder and I think this is really ok because you have only advantages by that.

Of course I could copy all this "temp"-files to a separate project folder, but why should I do that? There is no benefit in doing this except I need a milestone backup of all files.

And as we are talking about backups:
I do not use the backup feature of PSPad as its useless. Sorry that I need to say that but what is the benefit of having one copy of the last file change? The only backup that would make sense is a revision based backup. We assume that my temp folder is:
C:\projects\

and my backup folder would be:
C:\backups\

And if I make a change on c:\projects\example.com\index.php it will create a backup of this file on every CTRL+S operation in this format:
C:\backup\example.com\2015-04-20-22-03-15_index.php

Now I would have unlimited access to every revision.

P.S. I'm using my Synology NAS for backups and use its revision history feature so I'm having up to 32 revisions of one file:
image

Edited 1 time(s). Last edit at 2015-04-20 20:28 by mgutt.

Options: Reply | Quote | Up ^


#9 Re: Opening a file through FTP overwrites local newer file

Posted by: Andreas | Date: 2015-04-20 22:01 | IP: IP Logged

mgutt:
...Next task: Find all files containing the css class "header"

Now you will use the temp folder to search in, because this will include all recent files....

I think that's a mistake. You can not rely on a temp or backup folder when developing your project. You should work direct in your project, local or remote. So you should search in there.

This one case "searching for 'header' in a css file" I manage by searching with firebug in which files 'header' can be found. Or sometimes I open all css files with PSPad and search in there with PSPad find in files.

Note: Here I'm missing a search in remote files. Maybe this is worth a feature request or is this impossible to add to PSPad?

mgutt:
...I think most people use it as a project folder...

I don't think so, I think most are working with their project files, remote or local with or without PSPad project management.

mgutt:
...Of course I could copy all this "temp"-files to a separate project folder...

You should neither work with files in temp or backup folders nor copy them to anywhere.

mgutt:
...I do not use the backup feature of PSPad as its useless....

I do not use the backup feature. I only use those two folders for a folder structured copy of last version so I can not say if it's useless.

Options: Reply | Quote | Up ^


#10 Re: Opening a file through FTP overwrites local newer file

Posted by: mgutt | Date: 2015-04-24 15:22 | IP: IP Logged

Andreas:
This one case "searching for 'header' in a css file" I manage by searching with firebug in which files 'header' can be found.

But I did not say "search for "header" in css file". I said "search for all files that use this class". Maybe a better example: Say you need to check all regex codes. By that you search for "~" as it is you're delimiter.

Search on remote... Now you try to find an other solution for the same thing. And forget it. You can not search on remote as it would be slow as hell. Test the "search in filename" feature of Filezilla and you will see how slow that is. If you would search in file content this would be 100x slower.

You have only three options:
a) You have a local (containing old versions) and the temp folder (containing recent versions). Now you need to search in both folders. By that you will have multiple results of the same file. This is not useful and a waste of time.

b) Before searching you sync your local folder with Filezilla first. Waste of time as the temp folder still contains the recent files.

c) Do it my way. You use the temp folder as you're local folder. This contains all recent files so you do not need any further steps.

Maybe not all people use PSPad like I do, but finally they are wasting time if not.

If reducing working time is a target, PSPad should add the following features:
1.) download complete remote (optional filter for "*.ext;*.foo" if a user wishes to avoid media files)
2.) Confirm overwriting newer files (both ways)
3.) optionally clicking on a search result opens the remote file instead of the local one (maybe through context menu)
4.) And I suggested that before: Allow to up- and download media files.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR