bugGNUstep - Bugs: bug #44731, GWorkspace can delete my Desktop...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44731: GWorkspace can delete my Desktop Folder

Submitted by:  Bertrand Dekoninck <bdekoninck>
Submitted on:  Sun 05 Apr 2015 08:27:28 AM UTC  
 
Category:  Application Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  Riccardo Mottola <rmottola>
Open/Closed:  Closed

( Jump to the original submission)

Wed 27 May 2015 01:24:53 PM UTC, comment #14: 

Perfect!

Sure, it did load the old framework.

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Wed 27 May 2015 11:39:39 AM UTC, comment #13: 

Sorry it was my fault.
My base is not patched.

But I ran GWorkspace directly from gworkspace/GWorkspace in the source tree and it used my system installed FSNode instead of the new one.

It works as expected when I really install GWorkspace with GNUSTEP_INSTALLATION_DOMAIN=USER. And my Desktop symlink is also protected.

I'm really sorry for this mistake.

"Bug" closed, isn't it ?

Thanks !

Bertrand Dekoninck <bdekoninck>
Wed 27 May 2015 10:41:59 AM UTC, comment #12: 

This should be unrelated to the runtime, I'm using gcc, no libobjc2.

I see a lot of "spurious" output. about buttonBezierPath, reparenting  etc. Is your core "clean" I hope it doesn't contain relevant patches in base.

There is nothing suspicious. In Operation/Operation.m

line 497. May you print out the value of fullPath and the contents of specialPathArray? it will contain I suppose one element. In theory they should be the same.

If you don't know how to fiddle with the code or with GDB, I can make a small NSLog()  patch.

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Wed 27 May 2015 09:58:09 AM UTC, comment #11: 

And I forgot to tell : I'm not using libobjc2 because I never succeeded in compiling it on Debian Wheezy PPC.

Bertrand Dekoninck <bdekoninck>
Wed 27 May 2015 09:56:21 AM UTC, comment #10: 

Sorry, it doesn't work either with a newly created Desktop folder.

Here are the output in the terminal when I drag the Desktop folder to the trash :
I've got a message about thread-safe implementation when dragging.

bertrand@Gromac: openapp ./GWorkspace.app/
2015-05-27 11:49:59.689 GWorkspace[31890] Volumes ({dir = "/"; name = rootfs; type = rootfs; }, {dir = "/sys"; name = sysfs; type = sysfs; }, {dir = "/proc"; name = proc; type = proc; }, {dir = "/dev"; name = udev; type = devtmpfs; }, {dir = "/dev/pts"; name = devpts; type = devpts; }, {dir = "/run"; name = tmpfs; type = tmpfs; }, {dir = "/"; name = "/dev/disk/by-uuid/9ab7e290-6e57-4e54-bf32-5a276d9e6b2b"; type = ext4; }, {dir = "/run/lock"; name = tmpfs; type = tmpfs; }, {dir = "/run/shm"; name = tmpfs; type = tmpfs; }, {dir = "/home"; name = "/dev/sdb6"; type = ext4; }, {dir = "/media/Gromac"; name = "/dev/sdb3"; type = hfsplus; }, {dir = "/var/lib/nfs/rpc_pipefs"; name = "rpc_pipefs"; type = "rpc_pipefs"; }, {dir = "/proc/sys/fs/binfmt_misc"; name = "binfmt_misc"; type = "binfmt_misc";
})
2015-05-27 11:49:59.718 GWorkspace[31890] mountedRemovableMedia
2015-05-27 11:50:01.802 GWorkspace[31890] Ignore left offset change from 0 to 1
2015-05-27 11:50:01.804 GWorkspace[31890] Ignore right offset change from 0 to 1
2015-05-27 11:50:01.805 GWorkspace[31890] Ignore top offset change from 0 to 21
2015-05-27 11:50:01.805 GWorkspace[31890] Ignore bottom offset change from 0 to 9
2015-05-27 11:50:01.805 GWorkspace[31890] Reparent was with offset 0 20
2015-05-27 11:50:01.805 GWorkspace[31890] Parent border,width,height 1,856,693
2015-05-27 11:50:02.432 GWorkspace[31890] Ignore left offset change from 0 to 1
2015-05-27 11:50:02.434 GWorkspace[31890] Ignore right offset change from 0 to 1
2015-05-27 11:50:02.435 GWorkspace[31890] Ignore top offset change from 0 to 21
2015-05-27 11:50:02.435 GWorkspace[31890] Ignore bottom offset change from 0 to 9
2015-05-27 11:50:02.435 GWorkspace[31890] Reparent was with offset 0 20
2015-05-27 11:50:02.435 GWorkspace[31890] Parent border,width,height 1,642,378
2015-05-27 11:50:07.986 GWorkspace[31890] WARNING your program is becoming multi-threaded, but you are using an ObjectiveC runtime library which does not have a thread-safe implementation of the +initialize method. Please see README.initialize for more information.
2015-05-27 11:50:08.136 GWorkspace[31890] Ignore left offset change from 0 to 1
2015-05-27 11:50:08.136 GWorkspace[31890] Ignore right offset change from 0 to 1
2015-05-27 11:50:08.136 GWorkspace[31890] Ignore top offset change from 0 to 21
2015-05-27 11:50:08.136 GWorkspace[31890] Ignore bottom offset change from 0 to 1
2015-05-27 11:50:08.136 GWorkspace[31890] Reparent was with offset 0 20
2015-05-27 11:50:08.136 GWorkspace[31890] Parent border,width,height 1,280,96
2015-05-27 11:50:08.479 GWorkspace[31890] buttonBezierPath
2015-05-27 11:50:08.510 GWorkspace[31890] Ignore left offset change from 0 to 1
2015-05-27 11:50:08.511 GWorkspace[31890] Ignore right offset change from 0 to 1
2015-05-27 11:50:08.511 GWorkspace[31890] Ignore top offset change from 0 to 21
2015-05-27 11:50:08.511 GWorkspace[31890] Ignore bottom offset change from 0 to 1
2015-05-27 11:50:08.511 GWorkspace[31890] Reparent was with offset 0 20
2015-05-27 11:50:08.511 GWorkspace[31890] Parent border,width,height 1,384,181
2015-05-27 11:50:09.132 GWorkspace[31890] buttonBezierPath
2015-05-27 11:50:24.014 GWorkspace[31890] buttonBezierPath
2015-05-27 11:50:24.072 GWorkspace[31890] buttonBezierPath
2015-05-27 11:50:24.286 GWorkspace[31890] Ignore left offset change from 0 to 1
2015-05-27 11:50:24.286 GWorkspace[31890] Ignore right offset change from 0 to 1
2015-05-27 11:50:24.286 GWorkspace[31890] Ignore top offset change from 0 to 21
2015-05-27 11:50:24.286 GWorkspace[31890] Ignore bottom offset change from 0 to 1
2015-05-27 11:50:24.286 GWorkspace[31890] Reparent was with offset 0 20
2015-05-27 11:50:24.286 GWorkspace[31890] Parent border,width,height 1,362,181
2015-05-27 11:50:24.530 GWorkspace[31890] buttonBezierPath
2015-05-27 11:50:25.014 GWorkspace[31890] buttonBezierPath

Bertrand Dekoninck <bdekoninck>
Wed 27 May 2015 09:08:24 AM UTC, comment #9: 

it is most probably a symlink problem.
GWorkspace does not support localisation. It is a potential mess and i found no clean solution right now, so not part of this "bug".

Can you try temporarily creating a "Desktop" folder instead of a symlink and see if it works for you?

I tried:

lrwxr-xr-x   1 multix  users    12 May 27 10:49 Desktop -> Desktop_orig
drwxr-xr-x   7 multix  users   512 May 26 16:25 Desktop_orig

and "Desktop" gets the special icon and is also "protected" so it seems to work.

If that is the case, I need to dig deeper.

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Wed 27 May 2015 08:17:48 AM UTC, comment #8: 

So it doesn't work here. Neither with drag and drop, with menu or with #d. I can put my Desktop in the trash.

My Desktop folder is a sumlink to "Bureau" because I share my desktop with Gnome and Gnome translated the name  in french.

It's worth to notice that GWorkspace displays the correct "Desktop" icon for my symlink "Desktop" (but "Bureau" hasn't a special icon and that's why I created the symlink).

PS : Maybe, once this problem is solved, we can try to translate in GWorkspace the names  of Desktop, Images, Music, Downloads, Documents etc.

I've got 2 or 3 feature requests like this I could somehow help to, but I don't know where to address these requests.
I'm on the gnustep-dev and gnustep-discuss lists but I don't know if this is the right place.

Bertrand

Bertrand Dekoninck <bdekoninck>
Wed 27 May 2015 07:05:16 AM UTC, comment #7: 

Focus solved, good. Since that affects many thins.

"protected" means that your Desktop folder can't be moved to the trash to begin with, cannot be renamed, can't be "destroyed".

This when using GWorkspace's menu and drag-drop operations.

If that doesn't work for you (latest code?) then perhaps GS is not recognizing your desktop as desktop or there are other tricks that my simple path comparison is not taking in consideration.

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Tue 26 May 2015 07:31:56 PM UTC, comment #6: 

I've just compiled GWorkspace from svn.
The focus problem seems to be gone. Thanks. Good job.

But what do you mean by "protection for certain folders" ?
I tried to put my Desktop folder to the tras. That is still posible and I can empty the trash with that folder inside.

So I still can "delete anything"

Bertrand Dekoninck <bdekoninck>
Tue 26 May 2015 02:44:42 PM UTC, comment #5: 

Bertrand, I implemented some protection for certain folders, including Desktop.

Please check that too!

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Tue 26 May 2015 09:47:00 AM UTC, comment #4: 

Bertrand, I hope I just fixed your focus problems. Can you confirm?

You still can delete "anything", because that is a different issue.

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Mon 25 May 2015 04:33:26 PM UTC, comment #3: 

I think the bug was introduced by this optimization:

http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/GWorkspace/FileViewer/GWViewer.m?r1=37276&r2=37297

I am investigating how to fix the problem best. Selection does need to change and a notification needs to happen if a window changes focus, yet before too much was done.

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Thu 07 May 2015 08:19:12 PM UTC, comment #2: 

Thanks for your reply and the time you give.

I posted steps to reproduce this bug, maybe unclear.

It doesn't occur "on" the desktop but when working in a Viewer

I'm running GWorkspace with WindowMaker and I think it's definitly a focus problem of GWorkspace.

You can see that by opening a random folder (named folder A) on the desktop, click on a file (named file B) in the opened Folder Open the Inspector with #1 :it displays the name of file B and that's fine.

Then click on another Icon on the desktop  (Icon C). Then the Inspector displays Icon C. Right.

Click back to the opened Viewer where File B was selected, either by clicking on it's title bar or on File A's Icon  : the inspector displays "Desktop". Wrong. File B or Folder A aren't selected by GWorkspace.

I must then select something else in folder A to have the Inspector change. ANd then I can really select file A again.

There are other focus problems on the desktop. For instance, when I put a file from an opened folder in the trash, GWorkspace doesn't give the focus to the parent window of the deleted file. Then,  Terminal.app grabs the focus and its window rises.

Bertrand Dekoninck <bdekoninck>
Wed 06 May 2015 01:37:11 PM UTC, comment #1: 

GWorkspace currently does not protect any of the "special" folders (e.g. Desktop, but also Downloads, Images, Music...), they are just folders and as you can remove them with "rm -r" from terminal, you can from GWorkspace.

However, you state that by trying to delete another item and this sounds bad.
Either you had a problem with focus where somehow "Desktop" remained selected or there is a deeper problem.

I am unable to reproduce your bug. I tried removing a directory from the desktop and it works (if you have warnings it will say "remove items from .../Desktop".
If I select nothing on the desktop and delete, I get the message that I need to select something.

May you reduce the case? e.g. by selecting asn existing file only? or a directory?

Riccardo Mottola <rmottola>
Project MemberIn charge of this item.
Sun 05 Apr 2015 08:27:28 AM UTC, original submission:  

Debian Wheezy PPC and x86.

Last released version of GNUstep : gnustep-make-2.6.6 ; gnustep-base-1.24-7 ; gnustepgui/back-.24.0

GWorkspace-0.9.3

By chance, my Destop folder is a symlink to "Bureau" (in french) so I never lost any data, except thumbnails of files in GWorkspace.

Steps to reproduce :
- open GWorkspace.app and show Desktop.
- open Terminal.app
- create a "NewFolder" on the Desktop open it and make a NewFile in it.
- Select NewFile with the mouse
- Switch to Terminal.app
- Switch back to "NewFolder" by clicking on "NewFile" in the address bar of the NewFolder window.
- Delete "NewFile" with #d.

Then a dialog appear, saying "The Desktop directory has been deleted! Quiting now", and a second one "Wait for operations to terminate". GWorkspace doen't quit then.

But my "Desktop" symlink has appeared in the Recycler.

Is it a focus problem (there are others on the desktop)? Anyway, GWorkspace shouldn't be allowed to put that directory in the trash.

Where should I look in the code to avoid that ?

Bertrand Dekoninck <bdekoninck>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by bdekoninck (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-27 rmottola StatusIn Progress => Fixed
        Open/ClosedIn Test => Closed
    2015-05-27 rmottola StatusNone => In Progress
    2015-05-26 rmottola Assigned toNone => rmottola
        Open/ClosedOpen => In Test

    Back to the top


    Powered by Savane 3.5