You are here: PSPad forum > English discussion forum > Cannot open file (file saved by OneDrive)

Cannot open file (file saved by OneDrive)

#1 Cannot open file (file saved by OneDrive)

Posted by: menet | Date: 2020-04-25 18:59 | IP: IP Logged

Hi,
I was using since a long time PSPad version 4.6.2b2735.
I have migrated on Windows 10 since several time but since few, I use also the One Drive from my company to save several folders of my PC.
I goes well with this old PSPad version.

I have decided to update PSPad. I have installed the 5.0.3 official version before installing beta versions.
All seems good but at first time, I try to open a file that is on my PC (and on OneDrive), the opening falls with an error window :

Quote:
Cannot open file c:\Users\username\OneDrive - Company\folder\file.TXT
Cannot open file "c:\Users\username\OneDrive - Company\folder\file.TXT". Accès refusé
OK

(my translate : Refused Access)

On these files, my file navigator, Total Commander, show a "e" attribute. Looking the help, it's mean "NTFS encrypted"
Looking the Windows property of the file, Advanced Attributes, the last checkbox is marked : Encrypt content to secure data (my translate from French), the detail shows my company name and the state "Protected"
If I uncheck this last checkbox, I can open the file from PSPad 5 but after closing the file, I see that the protection come back.

Do you have an option to permit to read/write these protected file with PSPad 5 ?

Temporarily, I have restored the PSPad 4.6.2 to advoid this problem.

Best regards. Menet.

Options: Reply | Quote | Up ^


#2 Re: Cannot open file (file saved by OneDrive)

Posted by: pspad | Date: 2020-04-25 19:31 | IP: IP Logged

Hello
There would be some problem with file locking.
After any file change OneDrive lock the file and for the time of synchronization PSPad can't access it. Maybe PSPad 5 has softer file lock than previous version, caused by new Delphi version.

Run program settings / Direct edit button
Change:
DontChangeFileAttribute=1
SafeFileSave=1

Options: Reply | Quote | Up ^


#3 Re: Cannot open file (file saved by OneDrive)

Posted by: menet | Date: 2020-04-26 17:36 | IP: IP Logged

Hi Jan,

Thanks for the quick reply.

These 2 parameters were equal to zero initially.

Like proposed, I have set them to 1 but it does not change the problem.
After each try, I close PSPad.
I have not tried to reboot the PC to see if it changes something.

Do you have another idea ?

Best regards. Menet.

Options: Reply | Quote | Up ^


#4 Re: Cannot open file (file saved by OneDrive)

Posted by: pspad | Date: 2020-04-26 17:49 | IP: IP Logged

Sorry, last time I missed the part with encrypted attribute.
I will try to investigate what can cause problem

Can you try to simulate it outside of the One drive folder? Set E atribute to any file and try to edit it.

Edited 1 time(s). Last edit at 2020-04-26 17:51 by pspad.

Options: Reply | Quote | Up ^


#5 Re: Cannot open file (file saved by OneDrive)

Posted by: menet | Date: 2020-04-27 11:47 | IP: IP Logged

I have tried to check "Encrypt content to secure data" (my translate from French), the detail shows my user name. I have then the flag "e" but PSPad 5 opens the file without difficulty.

I have found a reason of the problem. If a drag the file from explorer and drop it to PSPad 5, I have a little question windows
"Utiliser du contenu professionel ici ?
Votre organisation peut suivre l'action. Voulez-vous vraiment continuer ?
Plus d'information
Oui / Non"
(Translated to english
"Use professional content here?
Your organization can follow the action. Are you sure you want to continue?
More information
Yes No")
If I use Yes it works.
If I click on "More information", it open the browser on Bing on "Supprimer le chiffrement de protection de fichiers professionnels" (Remove professional file protection encryption)

Previously I had not this litle question windows because, I choose to open a file from my PSPad Favorite tree (A hart icone before and a star icon now)

Regards. Menet

Options: Reply | Quote | Up ^






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